question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Error on npm start

See original GitHub issue

I 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:closed
  • Created 6 years ago
  • Comments:14 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
adurleacommented, Dec 16, 2019

same problem here… tried the npm update. does nothing, tried the link angular-cli i’m using npm 6.13.1

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.

0reactions
saitejap1234commented, Nov 25, 2020

I 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. (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. (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. (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 ]

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

Read more comments on GitHub >

github_iconTop Results From Across the Web

npm start giving error in node.js - Stack Overflow
The error suggests that the ./bin/www directory is not found. Paths specified with a dot are relative to the current directory, ...
Read more >
npm err! missing script: start Solution - Career Karma
If you type npm start and get the npm err! missing script: start error, there must be a missing line in the script...
Read more >
How to fix npm start command not working - Nathan Sebhastian
How to fix npm start command not working · Check if the package.json file exists · Check if the start script is defined...
Read more >
How to fix start script error when running npm start command
In this video we are going to learn how to fix start script error when running npm start command.Thank You For Visiting My...
Read more >
npm start not working / How to fix npm error React ... - YouTube
npm start not working / How to fix npm error React / npm start error node js / npm start in vs code....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found