Error on npm start
See original GitHub issueI am receiving an error on npm start. Below are the terminal text and log file:
ng serve -o
module.js:538 throw err; ^
Error: Cannot find module ‘abbrev’
at Function.Module._resolveFilename (module.js:536:15)
at Function.Module._load (module.js:466:25)
at Module.require (module.js:579:17)
at require (internal/module.js:11:18)
at Object.<anonymous> (C:\Users\akcook\Desktop\Angular\Angular-GettingStarted-master\APM\node_modules
nopt\lib\nopt.js:10:14)
at Module._compile (module.js:635:30)
at Object.Module._extensions…js (module.js:646:10)
at Module.load (module.js:554:32)
at tryModuleLoad (module.js:497:12)
at Function.Module._load (module.js:489:3)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! apm@0.0.0 start: ng serve -o
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the apm@0.0.0 start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
Logfile:
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@5.5.1
3 info using node@v8.9.3
4 verbose run-script [ ‘prestart’, ‘start’, ‘poststart’ ]
5 info lifecycle apm@0.0.0~prestart: apm@0.0.0
6 info lifecycle apm@0.0.0~start: apm@0.0.0
7 verbose lifecycle apm@0.0.0~start: unsafe-perm in lifecycle true
8 verbose lifecycle apm@0.0.0~start: PATH: …
10 silly lifecycle apm@0.0.0~start: Args: [ ‘/d /s /c’, ‘ng serve -o’ ]
11 silly lifecycle apm@0.0.0~start: Returned: code: 1 signal: null
12 info lifecycle apm@0.0.0~start: Failed to exec start script
13 verbose stack Error: apm@0.0.0 start: ng serve -o
13 verbose stack Exit status 1
13 verbose stack at EventEmitter.<anonymous> (C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\index.js:280:16)
13 verbose stack at emitTwo (events.js:126:13)
13 verbose stack at EventEmitter.emit (events.js:214:7)
13 verbose stack at ChildProcess.<anonymous> (C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\lib\spawn.js:55:14)
13 verbose stack at emitTwo (events.js:126:13)
13 verbose stack at ChildProcess.emit (events.js:214:7)
13 verbose stack at maybeClose (internal/child_process.js:925:16)
13 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:209:5)
14 verbose pkgid apm@0.0.0
15 verbose cwd C:\Users\Desktop\Angular\Angular-GettingStarted-master\APM
16 verbose Windows_NT 6.1.7601
17 verbose argv “C:\Program Files\nodejs\node.exe” “C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js” “start”
18 verbose node v8.9.3
19 verbose npm v5.5.1
20 error code ELIFECYCLE
21 error errno 1
22 error apm@0.0.0 start: ng serve -o
22 error Exit status 1
23 error Failed at the apm@0.0.0 start script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
24 verbose exit [ 1, true ]
Issue Analytics
- State:
- Created 6 years ago
- Comments:14 (5 by maintainers)
Top GitHub Comments
Hello i’m using npm 6.13.2 on Linux. Try after npm-update to update also the dependencies for your version of npm and Angular Cli:
npm install @angular-devkit/build-angular npm install @angular/cli npm install @angular/compiler-cli
This worked for me.
Go to search bar and write environment variables. You should see an option to called edit system environment variables or something similar. Under the Advanced section there is a enivronment variable button. click it. After that you will see an option named path click on it. click add button and add following directory C:\Windows\System32. close down your editor and restart your command terminal. Problem should be resolved now