![](/img/trans.png)
[英]I am getting /bin/sh: [npm: not found error while executing the react image in Docker
[英]sh: 1: concurrent: not found while npm start
我正在嘗試在我的本地機器上設置 angular2,我安裝了 node 和 npm,在我執行“npm start”安裝 npm 后,我收到以下錯誤
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
安裝 nodejs-legacy 后,此問題得到解決
apt-get install nodejs-legacy
首先運行yarn
然后再次npm start
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.