user3667512
user3667512

Reputation: 11

Trouble-shooting with AngularJS in NPM start

I've been receiving this error NPM install and NPM start while trying to start an AngularJS app

I've tried npm install

and npm start

( I've tried the above commands with sudo as well)

...

after executing the commands, I receive this error:

0 info it worked if it ends with ok
1 verbose cli [ '/usr/bin/nodejs', '/usr/bin/npm', 'start' ]
2 info using [email protected]
3 info using [email protected]
4 verbose read json /home/raheela/angular-phonecat/package.json
5 verbose run-script [ 'prestart', 'start', 'poststart' ]
6 info prestart [email protected]
7 verbose unsafe-perm in lifecycle true
8 silly exec sh "-c" "npm install"
9 silly sh,-c,npm install,/home/raheela/angular-phonecat spawning
10 info [email protected] Failed to exec prestart script
11 error [email protected] prestart: `npm install`
11 error `sh "-c" "npm install"` failed with 1
12 error Failed at the [email protected] prestart script.
12 error This is most likely a problem with the angular-phonecat package,
12 error not with npm itself.
12 error Tell the author that this fails on your system:
12 error     npm install
12 error You can get their info via:
12 error     npm owner ls angular-phonecat
12 error There is likely additional logging output above.
13 error System Linux 3.8.11
14 error command "/usr/bin/nodejs" "/usr/bin/npm" "start"
15 error cwd /home/raheela/angular-phonecat
16 error node -v v0.10.15
17 error npm -v 1.2.18e
18 error code ELIFECYCLE
19 verbose exit [ 1, true ]

Thank you!

edit: additional info

> [email protected] prestart /home/raheela/angular-phonecat
> npm install

npm WARN cannot run in wd [email protected] bower install (wd=/home/raheela/angular-phonecat)

> [email protected] start /home/raheela/angular-phonecat
> http-server -p 8000

/usr/bin/env: node: No such file or directory
npm ERR! [email protected] start: `http-server -p 8000`
npm ERR! `sh "-c" "http-server -p 8000"` failed with 127
npm ERR! 
npm ERR! Failed at the [email protected] start script.
npm ERR! This is most likely a problem with the angular-phonecat package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     http-server -p 8000
npm ERR! You can get their info via:
npm ERR!     npm owner ls angular-phonecat
npm ERR! There is likely additional logging output above.

npm ERR! System Linux 3.8.11
npm ERR! command "/usr/bin/nodejs" "/usr/bin/npm" "start"
npm ERR! cwd /home/raheela/angular-phonecat
npm ERR! node -v v0.10.15
npm ERR! npm -v 1.2.18
npm ERR! code ELIFECYCLE
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! 
npm ERR! Additional logging details can be found in:
    npm ERR!     /home/raheela/angular-phonecat/npm-debug.log
    npm ERR! not ok code 0

Upvotes: 0

Views: 1364

Answers (1)

user3667512
user3667512

Reputation: 11

I solved this with

sudo apt-get install nodejs-legacy

Upvotes: 1

Related Questions