dotenv file is not loading environment variables

后端 未结 9 1655
别那么骄傲
别那么骄傲 2020-12-13 08:36

I have .env file at root folder file

NODE_ENV=development
NODE_HOST=localhost
NODE_PORT=4000
NODE_HTTPS=false
DB_HOST=localhost
DB_USERNAME=user
DB         


        
9条回答
  •  误落风尘
    2020-12-13 09:10

    One time I have got the same problem. Dotenv did not load .env file. I tried to fix this problem with a path config, to put .env file in a root folder, to put .env in the folder where the file is running and nothing helps me. Then I just trashed Node_modules folder, reinstall all dependencies and it works correctly

提交回复
热议问题