【问题标题】:sh: 1: concurrent: not found while npm startsh:1:并发:在 npm 启动时未找到
【发布时间】:2016-07-13 05:56:47
【问题描述】:

我正在尝试在我的本地机器上设置 angular2,我安装了 node 和 npm,在安装 npm 后,当我执行“npm start”时出现以下错误

root@sameer-Vostro-2520:/home/sameer/angular2/angular-2-beta-boilerplate# npm start

> angular2-boilerplate@1.0.0 start /home/sameer/angular2/angular-2-beta-boilerplate
> concurrent "npm run gulp" "npm run lite" 

sh: 1: concurrent: not found
npm ERR! weird error 127
npm WARN This failure might be due to the use of legacy binary "node"
npm WARN For further explanations, please read
/usr/share/doc/nodejs/README.Debian

npm ERR! not ok code 0

我们如何解决这个问题?

安装并发但同样的错误

concurrently@2.2.0 /root/.node/lib/node_modules/concurrently
├── commander@2.6.0
├── bluebird@2.9.6
├── cross-spawn@0.2.9 (lru-cache@2.7.3)
├── moment@2.14.1
├── rx@2.3.24
├── lodash@4.13.1
└── chalk@0.5.1 (supports-color@0.2.0, escape-string-regexp@1.0.5, ansi-styles@1.1.0, strip-ansi@0.3.0, has-ansi@0.1.0)



> angular2-boilerplate@1.0.0 start /home/sameer/angular2/angular-2-beta-boilerplate
> concurrent "npm run gulp" "npm run lite" 

/usr/bin/env: node: No such file or directory
npm ERR! weird error 127
npm WARN This failure might be due to the use of legacy binary "node"
npm WARN For further explanations, please read
/usr/share/doc/nodejs/README.Debian

npm ERR! not ok code 0

【问题讨论】:

  • 好像没有安装concurrent。先尝试全局安装。 npm install -g concurrently

标签: javascript angularjs node.js npm npm-install


【解决方案1】:

安装 nodejs-legacy 后此问题得到修复

apt-get install nodejs-legacy

【讨论】:

    【解决方案2】:

    首先运行yarn,然后再次运行npm start

    【讨论】:

    • 请在您的回答中添加解释
    猜你喜欢
    • 2019-12-04
    • 2020-12-18
    • 1970-01-01
    • 2020-04-10
    • 2016-08-21
    • 2021-04-07
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多