What does process.env.NODE_ENV evaluate to?

Hi, I’m debugging an issue and have a theory that it started when I added --production=false to my Build Command (to get around a TypeScript compiling issue I read about here).

npm install --production=false && npx prisma generate && npx prisma migrate deploy

If this is my build command but in my “Environment” tab I have “NODE_ENV=production”, what will my typescript server code of process.env.NODE_ENV evaluate to?

Thank you!

Hi Aubrey,

Running npm install --production=false in a Node.js project tells npm to install both dependencies and devDependencies listed in the package.json file. I wouldn’t expect it to impact the value of process.env.NODE_ENV.

I’d suggest adding a debugging log line to print that value out so you can see what it’s evaluating to.

Regards,

Matt

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.