简体   繁体   中英

env-cmd path error when running npm run dev

I'm about to deploy my app. There are MONGODB_URL, PORT in dev.env under /config/, and I've installed env-cmd. My dev script looks like:

   "dev": "env-cmd ./config/dev.env nodemon index.js"

When I go 'npm run dev' in terminal, it says:

"Error: Failed to find.env file at default paths: [./.env,./.env.js,./.env.json] at getEnvFile blah blah"

Can somebody help please

Change it as "dev": "env-cmd -f./config/dev.env nodemon index.js"

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM