Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/angular/29.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
发生未处理的异常:找不到临时包的bin:@angular/cli_Angular_Angular Cli - Fatal编程技术网

发生未处理的异常:找不到临时包的bin:@angular/cli

发生未处理的异常:找不到临时包的bin:@angular/cli,angular,angular-cli,Angular,Angular Cli,我正试图按照以下指南将项目的角度版本从8更新到11:。到目前为止,对v9的更新仍然有效,但是在运行ng update@angular时/core@10@棱角/cli@10我现在收到一条错误消息,但我在网上找不到解决该问题的帖子 The installed local Angular CLI version is older than the latest stable version. Installing a temporary version to perform the update. ✔

我正试图按照以下指南将项目的角度版本从8更新到11:。到目前为止,对v9的更新仍然有效,但是在运行
ng update@angular时/core@10@棱角/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)
我尝试过“NPMCI”来重新安装所有节点模块,但我认为这没有帮助。有什么建议可以解决这个问题吗?

请执行以下操作:

  • sudo npm卸载-g@angular/cli
  • 苏都npm i-g@角度/cli@YOUR_LOCAL_VERSION(将package.json引入项目)
  • 如果没有帮助-添加package.json文件数据&ng--version执行以下操作:

  • sudo npm卸载-g@angular/cli
  • 苏都npm i-g@角度/cli@YOUR_LOCAL_VERSION(将package.json引入项目)

  • 如果没有帮助-添加package.json文件数据&ng--版本从12.0.0升级到12.0.1并收到相同的错误-升级/安装全局@angular/cli修复了它

    版本从12.0.0升级到12.0.1并收到相同的错误-升级/安装全局@angular/cli修复了它它