Skip to content
This repository has been archived by the owner on Feb 26, 2024. It is now read-only.

Error on npm start - Exit status 1 #292

Closed
nuander opened this issue Jul 29, 2015 · 14 comments
Closed

Error on npm start - Exit status 1 #292

nuander opened this issue Jul 29, 2015 · 14 comments

Comments

@nuander
Copy link

nuander commented Jul 29, 2015

I downloaded angular-seed to my computer. Then opened the command prompt to the root folder. npm install worked ok. I was also able to get jasmine tests to work OK. But not protractor. when I type npm start I get this.

0 info it worked if it ends with ok
1 verbose cli [ 'C:\Program Files\nodejs\node.exe',
1 verbose cli 'C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js',
1 verbose cli 'start' ]
2 info using npm@2.11.2
3 info using node@v0.12.6
4 verbose run-script [ 'prestart', 'start', 'poststart' ]
5 info prestart angular-seed@0.0.0
6 verbose unsafe-perm in lifecycle true
7 info start angular-seed@0.0.0
8 verbose unsafe-perm in lifecycle true
9 info angular-seed@0.0.0 Failed to exec start script
10 verbose stack Error: angular-seed@0.0.0 start: http-server -a localhost -p 8000 -c-1
10 verbose stack Exit status 1
10 verbose stack at EventEmitter. (C:\Program Files\nodejs\node_modules\npm\lib\utils\lifecycle.js:213:16)
10 verbose stack at EventEmitter.emit (events.js:110:17)
10 verbose stack at ChildProcess. (C:\Program Files\nodejs\node_modules\npm\lib\utils\spawn.js:24:14)
10 verbose stack at ChildProcess.emit (events.js:110:17)
10 verbose stack at maybeClose (child_process.js:1015:16)
10 verbose stack at Process.ChildProcess._handle.onexit (child_process.js:1087:5)
11 verbose pkgid angular-seed@0.0.0
12 verbose cwd D:\Projects\AngularSeed
13 error Windows_NT 6.1.7601
14 error argv "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js" "start"
15 error node v0.12.6
16 error npm v2.11.2
17 error code ELIFECYCLE
18 error angular-seed@0.0.0 start: http-server -a localhost -p 8000 -c-1
18 error Exit status 1
19 error Failed at the angular-seed@0.0.0 start script 'http-server -a localhost -p 8000 -c-1'.
19 error This is most likely a problem with the angular-seed package,
19 error not with npm itself.
19 error Tell the author that this fails on your system:
19 error http-server -a localhost -p 8000 -c-1
19 error You can get their info via:
19 error npm owner ls angular-seed
19 error There is likely additional logging output above.
20 verbose exit [ 1, true ]

@nuander
Copy link
Author

nuander commented Jul 30, 2015

let me try that again. my package.json looks like this

"name": "spectrumgmweb",
"private": true,
"version": "0.0.0",
"license": "UNLICENSED",
"description": "Spectrum GM Web project",
"devDependencies": {
    "bower": "^1.3.1",
    "http-server": "^0.6.1",
    "jasmine-core": "^2.3.4",
    "karma": "~0.12",
    "karma-chrome-launcher": "^0.1.12",
    "karma-firefox-launcher": "^0.1.6",
    "karma-jasmine": "^0.3.5",
    "karma-junit-reporter": "^0.2.2",
    "protractor": "^2.1.0",
    "shelljs": "^0.2.6"
},
"scripts": {
    "prestart": "npm install",
    "start": "http-server -a localhost -p 8000 -c-1",

    "pretest": "npm install",
    "test": "karma start karma.conf.js",
    "test-single-run": "karma start karma.conf.js  --single-run",

    "preupdate-webdriver": "npm install",
    "update-webdriver": "webdriver-manager update",

    "preprotractor": "npm run update-webdriver",
    "protractor": "protractor e2e-tests/protractor.conf.js",

    "update-index-async": "node -e \"require('shelljs/global'); sed('-i', /\\/\\/@@NG_LOADER_START@@[\\s\\S]*\\/\\/@@NG_LOADER_END@@/, '//@@NG_LOADER_START@@\\n' + sed(/sourceMappingURL=angular-loader.min.js.map/,'sourceMappingURL=bower_components/angular-loader/angular-loader.min.js.map','app/bower_components/angular-loader/angular-loader.min.js') + '\\n//@@NG_LOADER_END@@', 'app/index-async.html');\""
}

}

@praneethkumarpidugu
Copy link

Did you install nodejs ? Try to clone the nodejs
$git clone "nodejs github repo"
$cd node
$./configure --prefix==/usr/lib
$make
$sudo make install

then try to start with
$node start

@nuander
Copy link
Author

nuander commented Jul 31, 2015

yes thanks
from my npm start...
2 info using npm@2.11.2
3 info using node@v0.12.6

@nuander
Copy link
Author

nuander commented Aug 10, 2015

In my own project I am able to run protractor (without karma) from the command line if I first start selenium using webdriver-manager start

@Jamus123
Copy link

Jamus123 commented Sep 7, 2015

I'm getting the same issue

@ndr508
Copy link

ndr508 commented Sep 9, 2015

L uydwfml
On Sep 7, 2015 6:08 PM, "James Collins" notifications@github.com wrote:

I'm getting the same issue


Reply to this email directly or view it on GitHub
#292 (comment)
.

@ndr508
Copy link

ndr508 commented Sep 9, 2015

L uydwfml
On Sep 7, 2015 6:08 PM, "James Collins" notifications@github.com wrote:

I'm getting the same issue


Reply to this email directly or view it on GitHub
#292 (comment).

@grimaldodev
Copy link

hi, I fixed changing the port in the package,json file

orginal
"start": "http-server -a localhost -p 8000 -c-1",

fixed
"start": "http-server -a localhost -p 8080 -c-1",

if you have installed and running IIS or some automatic server that use the localhost port 8000 can block the node server.

@arthg
Copy link

arthg commented Nov 23, 2015

Same issue here. Changing the port number does not help in my case. Any further suggestions?

@ioliveros
Copy link

It maybe because another app is using the same port or you prematurely stop the application, if your on a linux machine, verify if the port is running

lsof -i:port
port - port npm is running, depends on what is specified on package.json, usually 8000

check if the running application is npm, now try to terminate it by

kill -9 ps ax | grep <pid>
pid - process id of the application running on that port, after that

npm start

It should be working now.

@xjkms
Copy link

xjkms commented Apr 19, 2016

gays,try these two commands:
npm install karma --save
npm install http-server -D
according to angular/angular-phonecat#303
this really solve my problem, hope it helps you.

@gkalpak
Copy link
Member

gkalpak commented Jun 18, 2016

All dependencies and tools have been updated recently and this is hopefully not an issue any more.
If anyone is still having problems, please open a new issue.

There are also some good suggestions above, that might help in certain cases (although this is a generic error and can be caused by several things).

@shirleyyu001
Copy link

I also encountered this problem, and my situation is that the port was occupied.

@vipinrai08
Copy link

  • ``

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests