info it worked if it ends with ok
1 verbose cli [ '/usr/local/bin/node', '/usr/local/bin/npm', 'run', 'build' ]
2 info using n...@4.6.1
3 info using no...@v7.10.0
4 verbose run-script [ 'prebuild', 'build', 'postbuild' ]
5 info lifecycle angular-q...@1.0.0~prebuild: angular-q...@1.0.0
6 silly lifecycle angular-q...@1.0.0~prebuild: no script for prebuild, continuing
7 info lifecycle angular-q...@1.0.0~build: angular-q...@1.0.0
8 verbose lifecycle angular-q...@1.0.0~build: unsafe-perm in lifecycle true
9 verbose lifecycle angular-q...@1.0.0~build: PATH: /usr/local/lib/node_modules/npm/bin/node-gyp-bin:/Users/jrough/project/Demo/node_modules/.bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin
10 verbose lifecycle angular-q...@1.0.0~build: CWD: /Users/jrough/project/Demo
11 silly lifecycle angular-q...@1.0.0~build: Args: [ '-c', 'tsc -p src/' ]
12 info lifecycle angular-q...@1.0.0~build: Failed to exec build script
13 verbose stack Error: angular-q...@1.0.0 build: `tsc -p src/`
13 verbose stack spawn ENOENT
13 verbose stack at ChildProcess.<anonymous> (/usr/local/lib/node_modules/npm/lib/utils/spawn.js:33:16)
13 verbose stack at emitTwo (events.js:106:13)
13 verbose stack at ChildProcess.emit (events.js:194:7)
13 verbose stack at maybeClose (internal/child_process.js:899:16)
13 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:226:5)
14 verbose pkgid angular-q...@1.0.0
15 verbose cwd /Users/jrough/project/Demo/src
16 verbose Darwin 16.6.0
17 verbose argv "/usr/local/bin/node" "/usr/local/bin/npm" "run" "build"
18 verbose node v7.10.0
19 verbose npm v4.6.1
20 error file sh
21 error code ELIFECYCLE
22 error errno ENOENT
23 error syscall spawn
24 error angular-q...@1.0.0 build: `tsc -p src/`
24 error spawn ENOENT
25 error Failed at the angular-q...@1.0.0 build script.
----config----
{
"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": {}
}
The error, "NOENT", usually indicates a missing file or directory. Are you sure the "src" folder exists?
--
You received this message because you are subscribed to the Google Groups "Angular and AngularJS discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to angular+u...@googlegroups.com.
To post to this group, send email to ang...@googlegroups.com.
Visit this group at https://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.
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...@5.0.4
3 info using no...@v7.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/jrough/project/Demo/node_modules/.bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin
8 verbose lifecycle angular-q...@1.0.0~prestart: CWD: /Users/jrough/project/Demo
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:283:16)
12 verbose stack at emitTwo (events.js:106:13)
12 verbose stack at EventEmitter.emit (events.js:194: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:194:7)
12 verbose stack at maybeClose (internal/child_process.js:899: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/jrough/project/Demo
15 verbose Darwin 16.6.0
16 verbose argv "/usr/local/bin/node" "/usr/local/bin/npm" "start"
17 verbose node v7.10.0
18 verbose npm v5.0.4
19 error code ELIFECYCLE
20 error errno 1
21 error angular-q...@1.0.0 prestart: `npm run build`
21 error Exit status 1
22 error Failed at the angular-q...@1.0.0 prestart script.
22 error This is probably not a problem with npm. There is likely additional logging output above.
23 verbose exit [ 1, true ]
sh-3.2# vi package.json
You need to run npm from the directory where the package.json lives. All paths in your configuration must be relative to that location.
Does that make sense?
--
You received this message because you are subscribed to the Google Groups "Angular and AngularJS discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to angular+u...@googlegroups.com.
To post to this group, send email to ang...@googlegroups.com.
Visit this group at https://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.
npm start
npm ERR! path /Users/jrough/package.json
npm ERR! code ENOENT
npm ERR! errno -2
npm ERR! syscall open
npm ERR! enoent ENOENT: no such file or directory, open '/Users/jrough/package.json'
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent
npm ERR! A complete log of this run can be found in:
npm ERR! /var/root/.npm/_logs/2017-07-06T16_27_44_505Z-debug.log
sh-3.2#
---log---
info it worked if it ends with ok
1 verbose cli [ '/usr/local/bin/node', '/usr/local/bin/npm', 'start' ]
2 info using n...@5.0.4
3 info using no...@v7.10.0
4 verbose stack Error: ENOENT: no such file or directory, open '/Users/jrough/package.json'
5 verbose cwd /Users/jrough/project
6 verbose Darwin 16.6.0
7 verbose argv "/usr/local/bin/node" "/usr/local/bin/npm" "start"
8 verbose node v7.10.0
9 verbose npm v5.0.4
10 error path /Users/jrough/package.json
11 error code ENOENT
12 error errno -2
13 error syscall open
14 error enoent ENOENT: no such file or directory, open '/Users/jrough/package.json'
15 error enoent This is related to npm not being able to find a file.
16 verbose exit [ -2, true ]
~
~
Only use sudo with no if you are installing modules globally. What you've done is, potentially, made the node_modules folder inaccessible.
According to line 14, you're running "npm start" from your user's directory instead of a project specific folder. That seems very strange.
0 info it worked if it ends with ok
1 verbose cli [ '/usr/local/Cellar/node/8.1.3/bin/node',
1 verbose cli '/usr/local/bin/npm',
1 verbose cli 'start' ]
2 info using n...@5.0.3
3 info using no...@v8.1.3
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/jrough/project/Demo/node_modules/.bin:/usr/local/npm_packages/bin:/usr/local/cellar/bin:/Users/jrough/.npm-packages/bin:/usr/local/git/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin
8 verbose lifecycle angular-q...@1.0.0~prestart: CWD: /Users/jrough/project/Demo
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: 2 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 2
12 verbose stack at EventEmitter.<anonymous> (/usr/local/lib/node_modules/npm/lib/utils/lifecycle.js:283:16)
12 verbose stack at emitTwo (events.js:125:13)
12 verbose stack at EventEmitter.emit (events.js:213: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:125:13)
12 verbose stack at ChildProcess.emit (events.js:213:7)
12 verbose stack at maybeClose (internal/child_process.js:897:16)
12 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:208:5)
13 verbose pkgid angular-q...@1.0.0
14 verbose cwd /Users/jrough/project/Demo