• node,node_env,cross-env不是内部或外部命令,也不是可运行的程序 或批处理文件。


    > blog-1@1.0.0 dev D:frontlearning odejs-serverlog-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 odejs-serverlog-1 ode_modules\_cross-spaw
    n@7.0.3@cross-spawnlibenoent.js:6:26)
    at verifyENOENT (D:frontlearning odejs-serverlog-1 ode_modules\_cross-spawn
    @7.0.3@cross-spawnlibenoent.js:40:16)
    at ChildProcess.cp.emit (D:frontlearning odejs-serverlog-1 ode_modules\_cro
    ss-spawn@7.0.3@cross-spawnlibenoent.js:27:25)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:256:12)
    Emitted 'error' event at:
    at ChildProcess.cp.emit (D:frontlearning odejs-serverlog-1 ode_modules\_cro
    ss-spawn@7.0.3@cross-spawnlibenoent.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: ode.js ode_cache\_logs2020-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: ode.js ode_cache\_logs2020-07-27T13_34_23_515Z-debug.log

    后来发现是NODE_ENV后面的等号前面和后面不能有空格

    改正后

  • 相关阅读:
    SysRq组合键是一组"魔术组合键"
    iptables FTP脚本
    (转)SSH的端口转发
    进制转换
    指定的参数已超出有效值的范围
    静态类
    接口
    快捷键,移到最上层
    gitbook
    nginx服务无法停止(Windows)
  • 原文地址:https://www.cnblogs.com/MySweetheart/p/13387813.html
Copyright © 2020-2023  润新知