Как исправить проблему предупреждения NPM и уязвимость высокой степени серьезности? - PullRequest
0 голосов
/ 01 мая 2019

Я вытащил проект приложения для 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

После I 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.
...