I have updated my global angular version to 14.1.0 and just created a new project
inside my project I tried to do this:
ng g m views/my-module
but the module is not created and this error occurs in terminal:
An unhandled exception occurred: Collection "@schematics/angular" cannot be resolved.
See "/tmp/ng-6nV3EN/angular-errors.log" for further details.
and also when I try to do ng serve
another error:
An unhandled exception occurred: Cannot find module 'copy-webpack-plugin'
Require stack:
- /home/muaaz/Projects/task/node_modules/@angular-devkit/build-angular/src/webpack/configs/common.js
- /home/muaaz/Projects/task/node_modules/@angular-devkit/build-angular/src/webpack/configs/index.js
- /home/muaaz/Projects/task/node_modules/@angular-devkit/build-angular/src/builders/dev-server/index.js
- /home/muaaz/Projects/task/node_modules/@angular-devkit/architect/node/node-modules-architect-host.js
- /home/muaaz/Projects/task/node_modules/@angular-devkit/architect/node/index.js
- /home/muaaz/Projects/task/node_modules/@angular/cli/src/command-builder/architect-base-command-module.js
- /home/muaaz/Projects/task/node_modules/@angular/cli/src/command-builder/architect-command-module.js
- /home/muaaz/Projects/task/node_modules/@angular/cli/src/commands/build/cli.js
- /home/muaaz/Projects/task/node_modules/@angular/cli/src/command-builder/command-runner.js
- /home/muaaz/Projects/task/node_modules/@angular/cli/lib/cli/index.js
- /usr/local/lib/node_modules/@angular/cli/lib/init.js
See "/tmp/ng-sSdlks/angular-errors.log" for further details.
I tried to clean the npm cache & delete "node_modules" then install again with npm install
but that did not work.
any ideas?