I’m trying to update the Angular version of a project from 8 to 11 following this guide: https://update.angular.io/?l=3&v=8.0-11.0. Updating to v9 has worked so far, however when running
ng update @angular/core@10 @angular/cli@10 I now get an error message and I can’t find a post online to solve it.
The installed local Angular CLI version is older than the latest stable version. Installing a temporary version to perform the update. ✔ Package successfully installed. An unhandled exception occurred: Cannot locate bin for temporary package: @angular/cli. See "/private/var/folders/qy/0lhcj3516gb2hmdfcfj8jpf40000gn/T/ng-G8l2Tv/angular-errors.log" for further details.
The logs show the following
[error] Error: Cannot locate bin for temporary package: @angular/cli. at Object.runTempPackageBin (/usr/local/lib/node_modules/@angular/cli/utilities/install-package.js:116:15) at processTicksAndRejections (internal/process/task_queues.js:97:5) at async UpdateCommand.validateAndRun (/usr/local/lib/node_modules/@angular/cli/models/command.js:136:22) at async Object.runCommand (/usr/local/lib/node_modules/@angular/cli/models/command-runner.js:205:24) at async default_1 (/usr/local/lib/node_modules/@angular/cli/lib/cli/index.js:70:31)
I’ve tried "npm ci" to reinstall all node modules but I don’t think that’s helping. Any suggestions how to fix this?
sudo npm uninstall -g @angular/cli
sudo npm i -g @angular/cli@YOUR_LOCAL_VERSION(take from package.json into your project)
if it didn’t help – add package.json file data & ng –version
Answered By – Никита Середа
Answer Checked By – Robin (AngularFixing Admin)