我正在尝试安装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====
答案 0 :(得分:0)
您的npm
版本已过时。
请通过以下命令更新全局npm
。
$ npm i -g npm
如果您使用 linux / ubuntu 或 OS X ,请附加前缀sudo
。
$ sudo npm i -g npm