【问题标题】:Installing AngularJS is showing warning message安装 AngularJS 显示警告消息
【发布时间】:2018-10-08 12:23:47
【问题描述】:

我正在尝试安装 AngularJS,当我恢复 package.json 文件的包时,它会在 输出 窗口上显示一条警告消息。

警告信息

npm WARN notice [SECURITY] lodash has the following vulnerability: 1 low. Go here for more details: https://nodesecurity.io/advisories?search=lodash&version=3.10.1 - Run `npm i npm@latest -g` to upgrade your npm version, and then `npm audit` to get more info.
npm WARN notice [SECURITY] debug has the following vulnerability: 1 low. Go here for more details: https://nodesecurity.io/advisories?search=debug&version=2.3.3 - Run `npm i npm@latest -g` to upgrade your npm version, and then `npm audit` to get more info.
npm WARN deprecated minimatch@0.3.0: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
npm WARN notice [SECURITY] ws has the following vulnerability: 1 high. Go here for more details: https://nodesecurity.io/advisories?search=ws&version=1.1.2 - Run `npm i npm@latest -g` to upgrade your npm version, and then `npm audit` to get more info.
npm WARN notice [SECURITY] debug has the following vulnerability: 1 low. Go here for more details: https://nodesecurity.io/advisories?search=debug&version=2.2.0 - Run `npm i npm@latest -g` to upgrade your npm version, and then `npm audit` to get more info.
npm WARN notice [SECURITY] minimatch has the following vulnerability: 1 high. Go here for more details: https://nodesecurity.io/advisories?search=minimatch&version=0.3.0 - Run `npm i npm@latest -g` to upgrade your npm version, and then `npm audit` to get more info.
npm WARN notice [SECURITY] parsejson has the following vulnerability: 1 high. Go here for more details: https://nodesecurity.io/advisories?search=parsejson&version=0.0.3 - Run `npm i npm@latest -g` to upgrade your npm version, and then `npm audit` to get more info.
npm WARN notice [SECURITY] https-proxy-agent has the following vulnerability: 1 high. Go here for more details: https://nodesecurity.io/advisories?search=https-proxy-agent&version=1.0.0 - Run `npm i npm@latest -g` to upgrade your npm version, and then `npm audit` to get more info.
npm notice created a lockfile as package-lock.json. You should commit this file.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.4 (node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.4: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
added 614 packages in 106.81s

这是我的节点和 npm 版本

node -v v8.11.0

npm -v 5.6.0

我的安装有什么问题吗?

我使用的是 Windows 10 64 位

更新

在我运行以下命令后

C:\Users\liam>npm i -g npm
C:\Users\liam\AppData\Roaming\npm\npx -> C:\Users\liam\AppData\Roaming\npm\node_modules\npm\bin\npx-cli.js
C:\Users\liam\AppData\Roaming\npm\npm -> C:\Users\liam\AppData\Roaming\npm\node_modules\npm\bin\npm-cli.js
+ npm@6.4.1
added 387 packages in 29.578s

C:\Users\liam>

然后当我恢复包Package.json

显示

====Executing command 'npm install'====


npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.4 (node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.4: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
audited 4242 packages in 5.854s
found 18 vulnerabilities (9 low, 9 high)
  run `npm audit fix` to fix them, or `npm audit` for details

====npm command completed with exit code 0====

【问题讨论】:

    标签: angularjs npm-install


    【解决方案1】:

    您的npm 版本已过期。

    请通过以下命令更新您的全局npm

    $ npm i -g npm
    

    如果您使用 linux/ubuntuOS X,请附加前缀 sudo

    $ sudo npm i -g npm
    

    【讨论】:

    • 我应该在项目的根目录上运行该命令吗?
    • @Liamneesan 没关系。 -g 表示全局
    • @Liamneesan 在终端的任何地方都可以。 -g 表示 npm 全局运行。
    • @lealceldeiro 仍然显示错误。你能看到我的更新吗?
    • @Liamneesan 检查了您更新的日志。我觉得无论如何都无所谓。自从package-lock.json 被引入以来,我们会经常遇到一些问npm audit 的漏洞。它们可以被忽略。
    猜你喜欢
    • 1970-01-01
    • 2022-10-14
    • 2016-05-03
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多