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.

Angular - cli error - apm@0.0.0 start: `ng serve -o`

See original GitHub issue

Hi,

I am facing issues while starting the server. I tried installing the latest angular cli. As i have nodjs version 8.8.1, it is not compatible with it. So i installed angular cli 1.6.8.

Logs*****

0 info it worked if it ends with ok 1 verbose cli [ ‘C:\dir\nodejs\8.8.1\node.exe’, 1 verbose cli ‘C:\dir\nodejs\8.8.1\node_modules\npm\bin\npm-cli.js’, 1 verbose cli ‘start’ ] 2 info using npm@5.4.2 3 info using node@v8.8.1 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 9 verbose lifecycle apm@0.0.0~start: CWD: H:\dir\Angular-GettingStarted-master\APM-Start 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:\dir\nodejs\8.8.1\node_modules\npm\node_modules\npm-lifecycle\index.js:280:16) 13 verbose stack at emitTwo (events.js:125:13) 13 verbose stack at EventEmitter.emit (events.js:213:7) 13 verbose stack at ChildProcess.<anonymous> (C:\dir\nodejs\8.8.1\node_modules\npm\node_modules\npm-lifecycle\lib\spawn.js:55:14) 13 verbose stack at emitTwo (events.js:125:13) 13 verbose stack at ChildProcess.emit (events.js:213:7) 13 verbose stack at maybeClose (internal/child_process.js:927:16) 13 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:211:5) 14 verbose pkgid apm@0.0.0 15 verbose cwd H:\Angular-Training\Angular-GettingStarted-master\APM-Start 16 verbose Windows_NT 6.1.7601 17 verbose argv “C:\dir\nodejs\8.8.1\node.exe” “C:\dir\nodejs\8.8.1\node_modules\npm\bin\npm-cli.js” “start” 18 verbose node v8.8.1 19 verbose npm v5.4.2 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 ]

Can we do away with cli modules and try to run the server?

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:10 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
thebadboy007commented, Aug 9, 2019

Thanks Deborah. Now it’s working fine

1reaction
DeborahKcommented, Aug 8, 2019

Those are not errors, they are warnings. Running audit fix is causing your problem. The code for this project is set up to work with a specific version. Running audit fix tries to update some of the versions and causes problems trying to run the code.

Try this:

  1. Delete all of the folders/files.

  2. Re-download or unzip the files.

  3. Run npm install. Ignore all warnings and do NOT run audit fix.

  4. Run npm start.

Let me know if that fixes things for you.

Read more comments on GitHub >

github_iconTop Results From Across the Web

npm start is not working npm (ERR! Failed at the apm@0.0.0 ...
angular CLI = 6.1.5. I am using windows 7 > apm@0.0.0 start F:\Angular\Angular-GettingStarted-master\APM-Start > ng serve -o npm ERR! file ...
Read more >
Angular – npm start is not working npm (ERR! Failed at the apm ...
angular CLI = 6.1.5. I am using windows 7 > apm@0.0.0 start F:\Angular\Angular-GettingStarted-master\APM-Start > ng serve -o npm ERR! file bash npm ERR!...
Read more >
ng serve - Angular
Option Description Value Type Default Value ‑‑hmr Enable hot module replacement. boolean false ‑‑host Host to listen on. string localhost ‑‑open Opens the url in default...
Read more >
12.0.0 - @angular/cli - npm
Start using @angular/cli in your project by running `npm i @angular/cli`. ... ng serve --host 0.0.0.0 --port 4201 ...
Read more >
node server crashes #9314 - Asp.Net Zero Support
Angular Live Development Server is listening on 0.0.0.0:4200, ... start: `gulp buildDev && ng serve --host 0.0.0.0 --port 4200` npm ERR!
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