admin管理员组

文章数量:1306063

I am trying to setup angular2 on my local machine, I installed node and npm, after installing npm when I do 'npm start' I am getting below error

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

> [email protected] 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

How can we fix this?

installed concurrent but again same error

[email protected] /root/.node/lib/node_modules/concurrently
├── [email protected]
├── [email protected]
├── [email protected] ([email protected])
├── [email protected]
├── [email protected]
├── [email protected]
└── [email protected] ([email protected], [email protected], [email protected], [email protected], [email protected])



> [email protected] 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

I am trying to setup angular2 on my local machine, I installed node and npm, after installing npm when I do 'npm start' I am getting below error

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

> [email protected] 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

How can we fix this?

installed concurrent but again same error

[email protected] /root/.node/lib/node_modules/concurrently
├── [email protected]
├── [email protected]
├── [email protected] ([email protected])
├── [email protected]
├── [email protected]
├── [email protected]
└── [email protected] ([email protected], [email protected], [email protected], [email protected], [email protected])



> [email protected] 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
Share Improve this question edited Jul 13, 2016 at 6:53 SameerShaik asked Jul 13, 2016 at 5:56 SameerShaikSameerShaik 5262 gold badges10 silver badges24 bronze badges 1
  • 6 It seems that you haven't installed concurrent. Try installing it globally first. npm install -g concurrently – Adrian Commented Jul 13, 2016 at 6:02
Add a ment  | 

3 Answers 3

Reset to default 2

First run yarn and then npm start again

This issue got fixed after installing nodejs-legacy

apt-get install nodejs-legacy

Someone who is having difficult running mand in your package json file and getting error like

[0] /bin/sh: xxx: mand not found
[1] /bin/sh: xxx: mand not found

Solution - Note You are running npm mands via npm so your mand should use

npm:

Example - if you got, following npm mand start, build, lint

You will have concurrently mand like this

"scripts: {
  "start": "ng start",
  "build": "ng build",
  "lint": "ng lint"
  "run:all": "concurrently npm:start npm:build npm:lint"
}

See in above script usage of npm:

本文标签: javascriptsh 1 concurrent not found while npm startStack Overflow