Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

"Error: Cannot find module '@angular-devkit/schematics/tasks' " on updating angular cli

When updating angular cli in project root folder I run into an error.

Running this command: ng update @angular/cli

returns the following error

Error: Cannot find module '@angular-devkit/schematics/tasks'
Cannot find module '@angular-devkit/schematics/tasks'

I tried removing node modules file then run npm install, also tried running npm i @angular-devkit/schematics but the error persists.

local CLI version: 1.7.4, global CLI version: 7.3.7

like image 942
nimrutta Avatar asked Aug 12 '26 10:08

nimrutta


1 Answers

Run npm update -g @angular/cli then add '^' before the version clousre like follows

"@angular/cli": "^1.7.4"

Delete package-lock.json file and node_modules directory. Then run npm i or use npm update to update your workspace.

like image 74
ymssa___ Avatar answered Aug 14 '26 23:08

ymssa___



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!