当将 my更新为Angular 10时,从角CLI获得一个错误:
ng update @angular/core@10 @angular/cli@10 --verbose这是原木:
The installed local Angular CLI version is older than the latest stable version.
Installing a temporary version to perform the update.
Installing packages for tooling via npm.
An unhandled exception occurred: npm WARN deprecated request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
npm ERR! code ENOENT
npm ERR! syscall chmod
npm ERR! path /private/var/folders/61/97bh4mb175n05ghhhm_8qsj0r54xf0/T/angular-cli-packages-aWYNdI/node_modules/npm-packlist/bin/index.js
npm ERR! errno -2
npm ERR! enoent ENOENT: no such file or directory, chmod '/private/var/folders/61/97bh4mb175n05ghhhm_8qsj0r54xf0/T/angular-cli-packages-aWYNdI/node_modules/npm-packlist/bin/index.js'
npm ERR! enoent This is related to npm not being able to find a file.
Package install failed, see above.
node -v
v12.13.0
npm -v
6.12.0有什么想法吗?这里可能有什么问题,如何解决?
发布于 2021-02-01 06:51:14
正式检查update.angular的应用程序兼容性版本。
还可以通过以下方法验证npm缓存
npm cache verify
否则用武力清洗
npm cache clean --force
更新::从14.15.4正式下载节点
然后重新安装@角/cli
npm i -g @angular/cli@latest
删除项目node_modules & package-lock.json
重新安装node_modules。
然后执行ng update @angular/core@latest @angular/cli@latest --verbose
请确保您的节点和npm按照所需的角度文档进行更新。
https://stackoverflow.com/questions/65988217
复制相似问题