Reputation: 11
I found this error when I run in next js. The script text is ▷ Debug
"scripts": {
"dev: "ENVIRONMENT=env/.env.development next dev", "check": "npm run format && npm run eslint", "eslint": "eslint --ext .jsx,.js components/ pages/",
"format": }
Upvotes: 0
Views: 931
Reputation: 16
NextJS has built-in support for loading env variables from .env.local
and .env.development
, so try to use that.
If you need to pass custom env file, at least you need to put the ENVIRONMENT argument after next dev
, not before.
Upvotes: 0