linnovate / mean

The MEAN stack uses Mongo, Express, Angular(6) and Node for simple and scalable fullstack js applications
http://mean.io
12.13k stars 3.45k forks source link

can't run the server side throw new Error(`Config validation error: ${error.message}`); [SERVER] ^ #1996

Closed orZohar closed 3 years ago

danielglazer commented 3 years ago

reproduced... the more specific error I get is "Error: Config validation error: child "JWT_SECRET" fails because ["JWT_SECRET" is required]" just trying to run it for the 1st time. I recommend that instructions on how to run will be added to the readme. @orZohar EDIT: my bad. you need to do 'cp .env.example .env' before running... I use npm so npm i then npm start and you should be good to go

arturovt commented 3 years ago

Hey @orZohar

This exception is thrown during the validation of environment variables. Environment variables are coming from the .env file through the dotenv package. Please see the installation section and this command:

cp .env.example .env

I will close this for now as "not an issue". Feel free to re-open if I'm missing anything.