0

I am having problems creating angular projects. Until a few moments ago it was working fine, but now when I create a new project( ng new <project_name> ) the node_modules folder that contains all installed dependencies doesn't appear anymore.

I can't even run( ng serve ) the project because of this. It just prints on the screen:

Node packages may not be installed. Try installing with 'npm install'.
Error: Could not find the '@angular-devkit/build-angular:dev-server' builder's node package.

I tried all these commands:

npm uninstall --save-dev @angular/cli
npm uninstall --save @angular/cli
npm cache clean --force
npm install --save @angular/cli
npm install

Especially npm install that only prints up to date in 662ms. Also in other projects that have the folder, when I try to install other dependencies it only shows as in the example:

changed 36 packages in 14s
2 packages are looking for funding

I search the project and find nothing. I don't know what else to do. If someone can please help me solve this I would really appreciate it.

lys_18
  • 13
  • 3

1 Answers1

0

The error is saying it cannot find "@angular-devkit/build-angular:dev-server". so you should install it using the following command. The command will fail if you do not have peerDependencies set to true so I will add the force flag.

npm install @angular-devkit/build-angular --force
Luigi Woodhouse
  • 332
  • 3
  • 14
  • thanks for the answer, but it didn't work – lys_18 Jun 26 '23 at 12:00
  • Ok refer to the following links, you may find an answer there https://stackoverflow.com/questions/50333003/angular-6-could-not-find-module-angular-devkit-build-angular https://stackoverflow.com/questions/56623458/could-not-find-the-implementation-for-builder-angular-devkit-build-angulardev – Luigi Woodhouse Jun 26 '23 at 13:46