Reputation: 1100
I've got a ionic 5 project and need to update it to V6, i followed the official documentation guide , but when im trying to update Angular to latest version it failed with following error,
C:\Users\Documents\WRepo>npx @angular/cli@13 update @angular/core@13 @angular/cli@13 The installed local Angular CLI version is older than the latest stable version. Installing a temporary version to perform the update. √ Package successfully installed. internal/modules/cjs/loader.js:892 throw err; ^
Error: Cannot find module 'C:\Users\Documents\WRepo\'C:\Users\AppData\Local\Temp\angular-cli-packages-qTXpp3\node_modules\@angular\cli\bin\ng.js''
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:889:15)
at Function.Module._load (internal/modules/cjs/loader.js:745:27)
at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:76:12)
at internal/main/run_main_module.js:17:47 { code: 'MODULE_NOT_FOUND', requireStack: [] }
What causes this error and how can i update ionic version successfully ?
Thanks in advance.
Upvotes: 0
Views: 385
Reputation: 1127
I think that Ionic update documentation is not too detailed. And this is the issue with angular CLI. You should do the update according to official angular update.
https://update.angular.io/
From which angular version are you trying to update? If that doesn't work try removing CLI and clearing cache
npm uninstall -g @angular/cli
npm cache clean --force
npm cache verify
and then install CLI v13.
Upvotes: 1