如何解决NPM警告问题和高严重性漏洞?

时间:2019-05-01 04:02:50

标签: macos cordova vue.js npm node-modules

我拉出一个iOS应用程序项目,并尝试在MacBook Pro上构建它。这是我第一次尝试在Mac上部署应用程序,我遇到了很多有关npm的问题。我的应用程序由Vue编写,将由cordova构建。当我运行npm install时,它显示如下冲突,其中有些node.module需要webpack@3,而有些需要webpack@4。我该怎么解决?

错误代码:

npm WARN extract-text-webpack-plugin@3.0.2 requires a peer of webpack@^3.1.0 but none is installed. You must install peer dependencies yourself.
npm WARN html-webpack-plugin@2.30.1 requires a peer of webpack@1 || ^2 || ^2.1.0-beta || ^2.2.0-rc || ^3 but none is installed. You must install peer dependencies yourself.
npm WARN pdfjs-dist@2.0.489 requires a peer of webpack@^2.0.0 || ^3.0.0 but none is installed. You must install peer dependencies yourself.

│ High          │ Arbitrary File Overwrite                                     │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Package       │ tar                                                          │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Patched in    │ >=4.4.2                                                      │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Dependency of │ node-sass                                                    │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Path          │ node-sass > node-gyp > tar                                   │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ More info     │ https://nodesecurity.io/advisories/803                       │

在我npm install webpack@^3.1.0之后,这些错误与严重程度相同的漏洞错误一起显示:

npm WARN css-loader@2.1.1 requires a peer of webpack@^4.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN optimize-css-assets-webpack-plugin@5.0.1 requires a peer of webpack@^4.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN webpack-dev-middleware@3.6.2 requires a peer of webpack@^4.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN webpack-dev-server@3.3.1 requires a peer of webpack@^4.0.0 but none is installed. You must install peer dependencies yourself.

0 个答案:

没有答案