Error NODE ENV is not recognized as an internal or external command operable command or batch file

0 votes

I'm trying to setup an environment for a Node.js app. but I'm getting this error:

"NODE_ENV" is not recognized as an internal or external command, operable command or batch file.

What does this mean and how can I solve this problem?

I'm using Windows and also tried set NODE_ENV=development.

Jul 16, 2020 in Node-js by kartik
• 37,520 points
20,258 views

1 answer to this question.

+1 vote

Hello @kartik,

It sounds like your error comes from an attempt to run something like this (which works in Linux)

NODE_ENV=development node foo.js

the equivalent in Windows would be

SET NODE_ENV=development
node foo.js

running in the same command shell.

Hope it is helpfull!!
Thank you!!

answered Jul 16, 2020 by Niroj
• 82,840 points

Related Questions In Node-js

+1 vote
0 answers
0 votes
1 answer

Error:nvm is not compatible with the npm config "prefix" option:

Hello @kartik, After installing nvm using brew, create ~/.nvm directory: $ ...READ MORE

answered Jul 15, 2020 in Node-js by Niroj
• 82,840 points
4,807 views
0 votes
1 answer

Error:sudo: npm: command not found

Hello @kartik, I had the same problem; here ...READ MORE

answered Jul 15, 2020 in Node-js by Niroj
• 82,840 points
12,554 views
0 votes
1 answer

Error:/usr/bin/env: node: No such file or directory

Hello @kartik, You have to manually link to ...READ MORE

answered Oct 12, 2020 in Node-js by Niroj
• 82,840 points
7,173 views
0 votes
1 answer

jQuery AJAX fires error callback on window unload - how do I filter out unload and only catch real errors?

Hello, In the error callback or $.ajax you have three ...READ MORE

answered Apr 27, 2020 in Java-Script by Niroj
• 82,840 points
4,188 views
0 votes
1 answer

How do I pass command line arguments to a Node.js program?

Hello @kartik, If your script is called myScript.js ...READ MORE

answered May 5, 2020 in Java-Script by Niroj
• 82,840 points
3,241 views
0 votes
1 answer

Error:Issue when trying to use IN() in wordpress database

Hello @kartik, Try this code : // Create an ...READ MORE

answered May 8, 2020 in PHP by Niroj
• 82,840 points
1,115 views
+2 votes
1 answer

How do I debug Node.js applications?

Hello @kartik, Use node-inspector  from any browser supporting WebSocket. Breakpoints, ...READ MORE

answered Jul 8, 2020 in Node-js by Niroj
• 82,840 points
1,028 views
0 votes
1 answer

Error:'bower' is not recognized as an internal or external command, operable program or batch file

Hello @kartik, Fixed it by adding the 'npm' ...READ MORE

answered Oct 14, 2020 in Node-js by Niroj
• 82,840 points
5,709 views
0 votes
1 answer

Error:node' is not recognized as an internal or external command

Hello @kartik, Node is missing from the SYSTEM ...READ MORE

answered Oct 15, 2020 in Node-js by Niroj
• 82,840 points
8,360 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP