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.