Next.js staring in developmetd mode in production
Answered
Northeast Congo Lion posted this in #help-forum
Northeast Congo LionOP
cat .env | grep NODE_ENV
NODE_ENV="production"But in my
next.config.js when I console.log(process.env.NODE_ENV) it shows "development". Wtf?No other .env files
Answered by Northeast Congo Lion
I think this may be because I'm running
next instead of next start3 Replies
Northeast Congo LionOP
I'm running with
pm2, startup command is node /var/www/site/node_modules/.bin/nextNortheast Congo LionOP
I think this may be because I'm running
next instead of next startAnswer
@Northeast Congo Lion I think this may be because I'm running `next` instead of `next start`
correct.
next = next dev which sets environment to development