我正在尝试按照这个指南将一个项目从Angular 8升级到11:https://update.angular.io/?l=3&v=8.0-11.0。目前为止,升级到v9已经成功了,但是当运行ng update @angular/core@10 @angular/cli@10
时,我现在遇到了一个错误消息,我找不到在线上的文章来解决它。
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.
日志显示如下:
[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)
我已经尝试过使用“npm ci”来重新安装所有的节点模块,但我认为这并没有帮助。有什么建议可以解决这个问题吗?