npm start fails

838 views
Skip to first unread message

Roparzh Hemon

unread,
Apr 7, 2017, 6:42:19 AM4/7/17
to Angular and AngularJS discussion
Below is the content of my npm-debug.log and package.json files :

0 info it worked if it ends with ok
1 verbose cli [ '/usr/local/bin/node', '/usr/local/bin/npm', 'start' ]
2 info using n...@3.10.10
3 info using no...@v6.10.0
4 verbose run-script [ 'prestart', 'start', 'poststart' ]
5 info lifecycle angular-q...@1.0.0~prestart: angular-q...@1.0.0
6 verbose lifecycle angular-q...@1.0.0~prestart: unsafe-perm in lifecycle true
7 verbose lifecycle angular-q...@1.0.0~prestart: PATH: /usr/local/lib/node_modules/npm/bin/node-gyp-bin:/Users/roparzhhemon/Documents/Angular/Traversy_media/my_app/node_modules/.bin:/Users/roparzhhemon/.opam/system/bin:/Library/Frameworks/Python.framework/Versions/2.7/bin:/Applications/MAMP/bin/php/php5.6.7/bin:/usr/texbin:/opt/local/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin:/Library/TeX/texbin
8 verbose lifecycle angular-q...@1.0.0~prestart: CWD: /Users/roparzhhemon/Documents/Angular/Traversy_media/my_app
9 silly lifecycle angular-q...@1.0.0~prestart: Args: [ '-c', 'npm run build' ]
10 silly lifecycle angular-q...@1.0.0~prestart: Returned: code: 1  signal: null
11 info lifecycle angular-q...@1.0.0~prestart: Failed to exec prestart script
12 verbose stack Error: angular-q...@1.0.0 prestart: `npm run build`
12 verbose stack Exit status 1
12 verbose stack     at EventEmitter.<anonymous> (/usr/local/lib/node_modules/npm/lib/utils/lifecycle.js:255:16)
12 verbose stack     at emitTwo (events.js:106:13)
12 verbose stack     at EventEmitter.emit (events.js:191:7)
12 verbose stack     at ChildProcess.<anonymous> (/usr/local/lib/node_modules/npm/lib/utils/spawn.js:40:14)
12 verbose stack     at emitTwo (events.js:106:13)
12 verbose stack     at ChildProcess.emit (events.js:191:7)
12 verbose stack     at maybeClose (internal/child_process.js:877:16)
12 verbose stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:226:5)
13 verbose pkgid angular-q...@1.0.0
14 verbose cwd /Users/roparzhhemon/Documents/Angular/Traversy_media/my_app
15 error Darwin 15.3.0
16 error argv "/usr/local/bin/node" "/usr/local/bin/npm" "start"
17 error node v6.10.0
18 error npm  v3.10.10
19 error code ELIFECYCLE
20 error angular-q...@1.0.0 prestart: `npm run build`
20 error Exit status 1
21 error Failed at the angular-q...@1.0.0 prestart script 'npm run build'.
21 error Make sure you have the latest version of node.js and npm installed.
21 error If you do, this is most likely a problem with the angular-quickstart package,
21 error not with npm itself.
21 error Tell the author that this fails on your system:
21 error     npm run build
21 error You can get information on how to open an issue for this project with:
21 error     npm bugs angular-quickstart
21 error Or if that isn't available, you can get their info via:
21 error     npm owner ls angular-quickstart
21 error There is likely additional logging output above.
22 verbose exit [ 1, true ]


Contents of package.json :

{
  "name": "angular-quickstart",
  "version": "1.0.0",
  "description": "QuickStart package.json from the documentation, supplemented with testing support",
  "scripts": {
    "build": "tsc -p src/",
    "build:watch": "tsc -p src/ -w",
    "build:e2e": "tsc -p e2e/",
    "serve": "lite-server -c=bs-config.json",
    "serve:e2e": "lite-server -c=bs-config.e2e.json",
    "prestart": "npm run build",
    "start": "concurrently \"npm run build:watch\" \"npm run serve\"",
    "pree2e": "npm run build:e2e",
    "e2e": "concurrently \"npm run serve:e2e\" \"npm run protractor\" --kill-others --success first",
    "preprotractor": "webdriver-manager update",
    "protractor": "protractor protractor.config.js",
    "pretest": "npm run build",
    "test": "concurrently \"npm run build:watch\" \"karma start karma.conf.js\"",
    "pretest:once": "npm run build",
    "test:once": "karma start karma.conf.js --single-run",
    "lint": "tslint ./src/**/*.ts -t verbose"
  },
  "keywords": [],
  "author": "",
  "license": "MIT",
  "dependencies": {
    "@angular/common": "~4.0.0",
    "@angular/compiler": "~4.0.0",
    "@angular/core": "~4.0.0",
    "@angular/forms": "~4.0.0",
    "@angular/http": "~4.0.0",
    "@angular/platform-browser": "~4.0.0",
    "@angular/platform-browser-dynamic": "~4.0.0",
    "@angular/router": "~4.0.0",

    "angular-in-memory-web-api": "~0.3.0",
    "systemjs": "0.19.40",
    "core-js": "^2.4.1",
    "rxjs": "5.0.1",
    "zone.js": "^0.8.4"
  },
  "devDependencies": {
    "concurrently": "^3.2.0",
    "lite-server": "^2.2.2",
    "typescript": "~2.1.0",

    "canonical-path": "0.0.2",
    "tslint": "^3.15.1",
    "lodash": "^4.16.4",
    "jasmine-core": "~2.4.1",
    "karma": "^1.3.0",
    "karma-chrome-launcher": "^2.0.0",
    "karma-cli": "^1.0.1",
    "karma-jasmine": "^1.0.2",
    "karma-jasmine-html-reporter": "^0.2.2",
    "protractor": "~4.0.14",
    "rimraf": "^2.5.4",

    "@types/node": "^6.0.46",
    "@types/jasmine": "2.5.36"
  },
  "repository": {}
}



 












Sander Elias

unread,
Apr 7, 2017, 6:48:34 AM4/7/17
to Angular and AngularJS discussion
Hi Roparzh,

Did you do an npm install? 
If you did, you probably have some stale packages in your node_modules.
Dele the node_modules folder, then run "npm clean cache" after that "npm install", that should get you going.

If that doesn't help, you might want to try contacting the author of your seed.

Regards
Sander

Roparzh Hemon

unread,
Apr 7, 2017, 11:07:22 AM4/7/17
to Angular and AngularJS discussion
Thanks for your feedback. I did all the npm commands you suggested and npm start still doesn't work. My guess is that it is because of some recent changes I made into my code. I'll look more into it before asking for more help here
Reply all
Reply to author
Forward
0 new messages