Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
332 views
in Technique[技术] by (71.8m points)

node.js - 我是node.js中的新手,并表示我正在处理节点变量(im new in node.js and express im working on node variables)

in command line if I run NODE_ENV=development nodemon server.js .

(如果我运行NODE_ENV=development nodemon server.js则在命令行中。)

The cmd is showing the following error :

(该cmd显示以下错误:)

ERROR: NODE_ENV=development : The term 'NODE_ENV=development' is not recognized as the name of a cmdlet, function, script file, or operable program.

(错误:NODE_ENV = development:术语“ NODE_ENV = development”未被识别为cmdlet,函数,脚本文件或可运行程序的名称。)

Check the spelling of the name, or if a path was included, verify that the path is correct and try again.

(检查名称的拼写,或者是否包含路径,请验证路径是否正确,然后重试。)

At line:1 char:1 + NODE_ENV=development nodemon server.js + ~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : ObjectNotFound: (NODE_ENV=development:String) [], CommandNotFoundException + FullyQualifiedErrorId : CommandNotFoundException

(在第1行:char:1 + NODE_ENV =开发nodemon server.js + ~~~~~~~~~~~~~~~~~~ + + CategoryInfo:ObjectNotFound:(NODE_ENV = development:String)[] ,CommandNotFoundException + FullyQualifiedErrorId:CommandNotFoundException)

I also tried

(我也试过)

set NODE_ENV=development nodemon server.js

or

(要么)

NODE_ENV=development&&nodemon server.js

to set NODE_ENV=development but none of this command are working {my os:windows 10 ,editor visual studio}

(设置NODE_ENV=development但此命令均不起作用{我的操作系统:windows 10,editor visual studio})

  ask by Refat Chowdhury translate from so

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

Try this...

(尝试这个...)

set NODE_ENV=development&& nodemon server.js

NOTE: No space between development&&

(注意: development&&之间没有空格)


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...