【问题标题】:error installing angular cli how can i fix it?安装 Angular cli 时出错我该如何解决?
【发布时间】:2021-12-13 04:51:08
【问题描述】:

当我运行命令 npm install -g @angular/cli 时,我收到此错误。

λ npm install -g @angular/cli
npm notice Beginning October 4, 2021, all connections to the npm registry - including for package installation - must use TLS 1.2 or higher. You are currently using plaintext http to connect. Please visit the GitHub blog for more information: https://github.blog/2021-08-23-npm-registry-deprecating-tls-1-0-tls-1-1/
npm notice Beginning October 4, 2021, all connections to the npm registry - including for package installation - must use TLS 1.2 or higher. You are currently using plaintext http to connect. Please visit the GitHub blog for more information: https://github.blog/2021-08-23-npm-registry-deprecating-tls-1-0-tls-1-1/
npm WARN deprecated har-validator@5.1.5: this library is no longer supported
npm WARN deprecated uuid@3.4.0: Please upgrade  to version 7 or higher.  Older versions may use Math.random() in certain circumstances, which is known to be problematic.  See https://v8.dev/blog/math-random for details.
npm WARN deprecated request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
npm ERR! Cannot read properties of null (reading 'pickAlgorithm')

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\rossd\AppData\Local\npm-cache\_logs\2021-10-27T16_56_57_347Z-debug.log

我该如何解决这个问题?

我的 npm v 是 8.1.0。 我的节点 v 是 v16.13.0。

【问题讨论】:

    标签: npm angular-cli npm-install


    【解决方案1】:

    看起来你需要更新你的 node js 版本,然后它也会更新你的 npm 和 LTS 版本,正如它在this article 中所说,希望它对你有所帮助!

    我目前正在研究 Angular 8,我正在使用 npm v 7.11.2,我的节点 js v 是 14.15.1。

    【讨论】:

    • 我已经更新了node和npm版本
    • 降级怎么样?
    • 我该怎么做?
    • 首先,它不是一个经过验证的解决方案,但我确实可以在我的节点 js 版本上使用 angular,这样会有所帮助。然后要执行此“降级”,您必须首先卸载节点,因为您必须: 1.打开 Windows 控制面板。 2.选择程序和功能选项。 3.单击“卸载程序” 4.选择节点。 js,然后单击卸载链接。然后只需下载并安装您想要的版本
    猜你喜欢
    • 2021-12-07
    • 1970-01-01
    • 1970-01-01
    • 2023-01-03
    • 2017-12-02
    • 2022-12-14
    • 1970-01-01
    • 2020-03-09
    • 2018-12-25
    相关资源
    最近更新 更多