标签:add 程序 product lifecycle errno rip mamicode modules error:
> blog-1@1.0.0 dev D:\frontlearning\nodejs-server\blog-1
> cross-env NODE_ENV = dev nodemon ./bin/www.js
‘NODE_ENV‘ 不是内部或外部命令,也不是可运行的程序
或批处理文件。
events.js:173
throw er; // Unhandled ‘error‘ event
^
Error: spawn NODE_ENV ENOENT
at notFoundError (D:\frontlearning\nodejs-server\blog-1\node_modules\_cross-spaw
n@7.0.3@cross-spawn\lib\enoent.js:6:26)
at verifyENOENT (D:\frontlearning\nodejs-server\blog-1\node_modules\_cross-spawn
@7.0.3@cross-spawn\lib\enoent.js:40:16)
at ChildProcess.cp.emit (D:\frontlearning\nodejs-server\blog-1\node_modules\_cro
ss-spawn@7.0.3@cross-spawn\lib\enoent.js:27:25)
at Process.ChildProcess._handle.onexit (internal/child_process.js:256:12)
Emitted ‘error‘ event at:
at ChildProcess.cp.emit (D:\frontlearning\nodejs-server\blog-1\node_modules\_cro
ss-spawn@7.0.3@cross-spawn\lib\enoent.js:30:37)
at Process.ChildProcess._handle.onexit (internal/child_process.js:256:12)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! blog-1@1.0.0 dev: `cross-env NODE_ENV = dev nodemon ./bin/www.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the blog-1@1.0.0 dev script.
npm ERR! This is probably not a problem with npm. There is likely additional logging
output above.
npm ERR! A complete log of this run can be found in:
npm ERR! D:\node.js\node_cache\_logs\2020-07-27T13_30_19_644Z-debug.log
‘corss-env‘ 不是内部或外部命令,也不是可运行的程序
或批处理文件。
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! blog-1@1.0.0 prd: `corss-env NODE_ENV = production nodemon ./bin/www.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the blog-1@1.0.0 prd script.
npm ERR! This is probably not a problem with npm. There is likely additional logging
output above.
npm ERR! A complete log of this run can be found in:
npm ERR! D:\node.js\node_cache\_logs\2020-07-27T13_34_23_515Z-debug.log
后来发现是NODE_ENV后面的等号前面和后面不能有空格
改正后
node,node_env,cross-env不是内部或外部命令,也不是可运行的程序 或批处理文件。
标签:add 程序 product lifecycle errno rip mamicode modules error:
原文地址:https://www.cnblogs.com/MySweetheart/p/13387813.html