System Information
- Strapi Version: 4.1.12
- Operating System: Linux
- Database: postgres
- Node Version: v14.17.6
- NPM Version: 6.14.16
- Yarn Version:
I got this issue while I start the app:
debug: Server wasn’t able to start properly.
[2022-05-26 23:02:17.514] error: Missing jwtSecret. Please, set configuration variable “jwtSecret” for the users-permissions plugin in config/plugins.js (ex: you can generate one using Node with crypto.randomBytes(16).toString('base64')
).
For security reasons, prefer storing the secret in an environment variable and read it in config/plugins.js. See Environment configuration and variables - Strapi Developer Docs.
Error: Missing jwtSecret. Please, set configuration variable “jwtSecret” for the users-permissions plugin in config/plugins.js (ex: you can generate one using Node with crypto.randomBytes(16).toString('base64')
).
For security reasons, prefer storing the secret in an environment variable and read it in config/plugins.js. See Environment configuration and variables - Strapi Developer Docs.
I was trying to follow the steps in https://docs.strapi.io/developer-docs/latest/update-migration-guides/migration-guides/v4/migration-guide-4.0.6+-to-4.1.8.html#fixing-the-breaking-changes
Here is my plugnin.js, am I doing something wrong? Any help would be appreciated!
module.exports = ({ env }) => ({
‘users-permissions’: {
config: {
jwtSecret: env(‘JWT_SECRET’),
},
},
upload: {
provider: ‘local-custom-path’,
enabled: true,
providerOptions: {
path: env(‘UPLOADS_PATH’) || ‘public/uploads’,
sizeLimit: 100000
},
},
});