0

Im trying to start my angular project but for some reason every time I try to start it it gives me this error when i try to start the project via npm start on VScode in the terminal

> [email protected] start C:\Users\Work\Desktop\New folder\sign-up
> ng serve
An unhandled exception occurred: Cannot find module '@angular-devkit/build-angular/package.json'
Require stack:
- C:\Users\Work\AppData\Roaming\npm\node_modules\@angular\cli\node_modules\@angular-devkit\architect\node\node-modules-architect-host.js
- C:\Users\Work\AppData\Roaming\npm\node_modules\@angular\cli\node_modules\@angular-devkit\architect\node\index.js
- C:\Users\Work\AppData\Roaming\npm\node_modules\@angular\cli\models\architect-command.js
- C:\Users\Work\AppData\Roaming\npm\node_modules\@angular\cli\commands\serve-impl.js
- C:\Users\Work\AppData\Roaming\npm\node_modules\@angular\cli\node_modules\@angular-devkit\schematics\tools\export-ref.js
- C:\Users\Work\AppData\Roaming\npm\node_modules\@angular\cli\node_modules\@angular-devkit\schematics\tools\index.js
- C:\Users\Work\AppData\Roaming\npm\node_modules\@angular\cli\utilities\json-schema.js
- C:\Users\Work\AppData\Roaming\npm\node_modules\@angular\cli\models\command-runner.js
- C:\Users\Work\AppData\Roaming\npm\node_modules\@angular\cli\lib\cli\index.js
- C:\Users\Work\AppData\Roaming\npm\node_modules\@angular\cli\lib\init.js
- C:\Users\Work\AppData\Roaming\npm\node_modules\@angular\cli\bin\ng
See "C:\Users\Work\AppData\Local\Temp\ng-Sag7KS\angular-errors.log" for further details.
npm ERR! code ELIFECYCLE
npm ERR! syscall spawn
npm ERR! file C:\WINDOWS\system32\cmd.exe
npm ERR! errno ENOENT
npm ERR! [email protected] start: `ng serve`
npm ERR! spawn ENOENT
npm ERR!
npm ERR! Failed at the [email protected] start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm WARN Local package.json exists, but node_modules missing, did you mean to install?
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\Work\AppData\Roaming\npm-cache\_logs2021円-09-14T13_36_08_782Z-debug.log

I trying to reinstall node and angular cli but it still give this error and dont know what is wrong

asked Sep 14, 2021 at 13:40
1
  • Did you run npm install ? Commented Sep 14, 2021 at 13:42

1 Answer 1

0

are you trying to run npm start within root directory? if no, try to do

answered Sep 14, 2021 at 15:11
Sign up to request clarification or add additional context in comments.

1 Comment

As it’s currently written, your answer is unclear. Please edit to add additional details that will help others understand how this addresses the question asked. You can find more information on how to write good answers in the help center.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.