Viv*_*ade 6 error-handling node.js npm angular-cli angular
我是这个平台的新手。
我安装了Node.js但是当我尝试运行命令npm install -g @angular/cli 时
我收到了这个错误:
**npm WARN deprecated mkdirp@0.5.3: Legacy versions of mkdirp are no longer supported. Please update to mkdirp 1.x. (Note that the API surface has changed to use Promises in 1.x.)
npm WARN deprecated request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
npm WARN rollback Rolling back @schematics/angular@9.0.6 failed (this is probably harmless): EPERM: operation not permitted, lstat 'C:\Users\Vivek\AppData\Roaming\npm\node_modules\@angular\cli\node_modules\@sche**
Run Code Online (Sandbox Code Playgroud)
此外,当我尝试运行版本命令时
它向我展示了
**C:\Users\Vivek>ng v
internal/modules/cjs/loader.js:985
throw err;
^
Error: Cannot find module 'C:\Users\Vivek\AppData\Roaming\npm\node_modules\@angular\cli\bin\ng'**
Run Code Online (Sandbox Code Playgroud)
尝试这个...
要将所有软件包更新到新的主要版本,请全局安装 npm-check-updates 软件包:
npm install -g npm-check-updates
Run Code Online (Sandbox Code Playgroud)
然后运行ncu:
ncu -u --packageFile package.json
Run Code Online (Sandbox Code Playgroud)
这会将 package.json 文件中的所有版本提示升级为依赖项和 devDependency,以便 npm 可以安装新的主要版本。您现在已准备好运行更新:
npm update
Run Code Online (Sandbox Code Playgroud)
忽略任何审核建议并再次运行安装...
npm install
Run Code Online (Sandbox Code Playgroud)
这应该是弃用警告。
| 归档时间: |
|
| 查看次数: |
7117 次 |
| 最近记录: |