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

> sign-up@0.0.0 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! sign-up@0.0.0 start: `ng serve`
npm ERR! spawn ENOENT
npm ERR!
npm ERR! Failed at the sign-up@0.0.0 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\_logs\2021-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

Dunmol
  • 41
  • 4

1 Answers1

0

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

  • 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](/help/how-to-ask). – Community Sep 14 '21 at 16:14