Npm start returns error 127 when setting up angular -seed application

I am trying to configure an angular -seed application .

I installed nodejs with sudo apt-get install nodejs

Installed npm using sudo apt-get install npm

Installed gazebo with sudo apt-get install bower -g

Installed nodejs-legacy with sudo apt-get install nodejs-legacy

Opened my angular -seed application, run npm install . It went flawlessly without errors.

To start the server, I try to use npm start , but it returns the following information and an error.

 > angular-seed@0.0.0 prestart /home/venki/Downloads/angular-seed > npm install > angular-seed@0.0.0 postinstall /home/venki/Downloads/angular-seed > bower install > angular-seed@0.0.0 start /home/venki/Downloads/angular-seed > http-server -a localhost -p 8000 -c-1 sh: 1: http-server: 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 

I am using Ubuntu 14.04 LTS. Please let me know if any further information is needed.

+7
angularjs npm bower ubuntu
source share
3 answers

I assumed that the http server will be installed by default nodejs, but it turns out that it does not.

I installed the http server using

 sudo npm install -g http-server 

After that, npm start is simply started. What is this, the problem is resolved.

+7
source share

I installed nodejs-legacy using the following:

 apt-get install nodejs-legacy 

Than just ran npm after that. You should get your application in the browser.

+6
source share

I had to run both of the following commands;

 sudo npm install -g http-server apt-get install nodejs-legacy 

And then my program, trying to use NPM, worked correctly.

+5
source share

All Articles