I have a React + WebPack project, when I install the npm dependencies I get some warnings about unsatisfied peerDependencies:
$ npm install
npm WARN carte-blanche#0.2.1 requires a peer of webpack#>=1 <3 but none was installed.
npm WARN carte-blanche-react-plugin#0.2.1 requires a peer of webpack#>=1 <3 but none was installed.
npm WARN carte-blanche-react-plugin#0.1.3 requires a peer of carte-blanche#^0.1.0 but none was installed.
npm WARN carte-blanche-react-plugin#0.1.3 requires a peer of webpack#>=1 <3 but none was installed.
npm WARN extract-text-webpack-plugin#1.0.1 requires a peer of webpack#^1.9.11 but none was installed.
npm WARN karma-webpack#1.7.0 requires a peer of webpack#^1.4.0 but none was installed.
npm WARN react-overlays#0.5.4 requires a peer of react-dom#^0.14.0 but none was installed.
npm WARN react-simpletabs#0.6.1 requires a peer of react#0.12.x - 1.x but none was installed.
Everything works as expected, but I get these warnings and I can't find a way to resolve them.
I have tried manually installing (for instance) webpack manually, but nothing changes at all.
Related
First I receive this error: optimize-css-assets-webpack-plugin#5.0.4 requires a peer of webpack#^4.0.0 then I try with this: npm i optimize-css-assets-webpack-plugin#latest but got that message: terser-webpack-plugin#5.0.3 requires a peer of webpack#^5.1.0
I am seeking for a specific answer to my problem but I think it would be useful also for everyone else to have a general way of thinking about how to deal with similar issues from any other NPM packages
I have this general issue as I am trying to use °NEST JS° & °REACT° & °MY TS WORKFLOW° in the same repo...
I don't know if I have to drill down each possible dependency tree or If I have to open multiple issues or if I have to take care of these problems myself (alone)...
Below trying to get ZERO warning messages installing 3 versions of webpack next#5.0.0-rc.6 lates#5.4.0 and 4#4.44.2
npm install webpack#next # + webpack#5.0.0-rc.6
npm WARN babel-loader#8.1.0 requires a peer of webpack#>=2 but none is installed. You must install peer dependencies yourself.
npm WARN css-loader#5.0.1 requires a peer of webpack#^4.27.0 || ^5.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN eslint-webpack-plugin#2.2.0 requires a peer of webpack#^4.0.0 || ^5.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN file-loader#6.2.0 requires a peer of webpack#^4.0.0 || ^5.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN html-webpack-plugin#4.5.0 requires a peer of webpack#^4.0.0 || ^5.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN mini-css-extract-plugin#1.3.0 requires a peer of webpack#^4.4.0 || ^5.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN optimize-css-assets-webpack-plugin#5.0.4 requires a peer of webpack#^4.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN postcss-loader#4.0.4 requires a peer of webpack#^4.0.0 || ^5.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN sass-loader#10.0.5 requires a peer of webpack#^4.36.0 || ^5.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN style-loader#2.0.0 requires a peer of webpack#^4.0.0 || ^5.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN terser-webpack-plugin#5.0.3 requires a peer of webpack#^5.1.0 but none is installed. You must install peer dependencies yourself.
npm WARN url-loader#4.1.1 requires a peer of webpack#^4.0.0 || ^5.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN webpack-dev-middleware#3.7.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.11.0 requires a peer of webpack#^4.0.0 || ^5.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN webpack-manifest-plugin#2.2.0 requires a peer of webpack#2 || 3 || 4 but none is installed. You must install peer dependencies yourself.
npm WARN workbox-webpack-plugin#6.0.0-alpha.3 requires a peer of webpack#^4.4.0 || ^5.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN terser-webpack-plugin#4.2.3 requires a peer of webpack#^4.0.0 || ^5.0.0 but none is installed. You must install peer dependencies yourself.
npm install webpack#latest # + webpack#5.4.0
npm WARN optimize-css-assets-webpack-plugin#5.0.4 requires a peer of webpack#^4.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN webpack-dev-middleware#3.7.2 requires a peer of webpack#^4.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN webpack-manifest-plugin#2.2.0 requires a peer of webpack#2 || 3 || 4 but none is installed. You must install peer dependencies yourself.
npm install webpack#4 # + webpack#4.44.2
npm WARN deprecated chokidar#2.1.8: Chokidar 2 will break on node v14+. Upgrade to chokidar 3 with 15x less dependencies.
npm WARN deprecated fsevents#1.2.13: fsevents 1 will break on node v14+ and could be using insecure binaries. Upgrade to fsevents 2.
npm WARN notsup Unsupported engine for watchpack-chokidar2#2.0.0: wanted: {"node":"<8.10.0"} (current: {"node":"15.1.0","npm":"6.14.8"})
npm WARN notsup Not compatible with your version of node/npm: watchpack-chokidar2#2.0.0
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents#^1.2.7 (node_modules/watchpack-chokidar2/node_modules/chokidar/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents#1.2.13: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
npm WARN terser-webpack-plugin#5.0.3 requires a peer of webpack#^5.1.0 but none is installed. You must install peer dependencies yourself.
You appear to have an incompatible set of packages. I'm not sure about the syntax, my experience is with composer. If you look though that list you will see most of your packages require either a v4 OR v5:
npm WARN mini-css-extract-plugin#1.3.0 requires a peer of webpack#^4.4.0 || ^5.0.0 ...
You have one package that requires a v4 exclusively and another requires a v5 exclusively
npm WARN optimize-css-assets-webpack-plugin#5.0.4 requires a peer of webpack#^4.0.0 ...
npm WARN terser-webpack-plugin#5.0.3 requires a peer of webpack#^5.1.0 ...
I cloned Swashbuckle.AspNetCore and am trying to build it
However the node_modules folder is missing
I ran npm i redoc and got the following output
npm WARN saveError ENOENT: no such file or directory, open 'C:\Windows\System32\package.json'
npm notice created a lockfile as package-lock.json. You should commit this file.
npm WARN enoent ENOENT: no such file or directory, open 'C:\Windows\System32\package.json'
npm WARN redoc#2.0.0-rc.40 requires a peer of mobx#^4.2.0 || ^5.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN redoc#2.0.0-rc.40 requires a peer of react#^16.8.4 but none is installed. You must install peer dependencies yourself.
npm WARN redoc#2.0.0-rc.40 requires a peer of react-dom#^16.8.4 but none is installed. You must install peer dependencies yourself.
npm WARN redoc#2.0.0-rc.40 requires a peer of styled-components#^4.1.1 but none is installed. You must install peer dependencies yourself.
npm WARN mobx-react#6.3.0 requires a peer of mobx#^5.15.4 || ^4.15.4 but none is installed. You must install peer dependencies yourself.
npm WARN mobx-react#6.3.0 requires a peer of react#^16.8.0 || 16.9.0-alpha.0 but none is installed. You must install peer dependencies yourself.
npm WARN react-tabs#3.1.1 requires a peer of react#^16.3.0 but none is installed. You must install peer dependencies yourself.
npm WARN #redocly/react-dropdown-aria#2.0.11 requires a peer of react#^16.8.0 but none is installed. You must install peer dependencies yourself.
npm WARN #redocly/react-dropdown-aria#2.0.11 requires a peer of react-dom#^16.8.0 but none is installed. You must install peer dependencies yourself.
npm WARN #redocly/react-dropdown-aria#2.0.11 requires a peer of styled-components#^5.1.1 but none is installed. You must install peer dependencies yourself.
npm WARN mobx-react-lite#2.2.1 requires a peer of mobx#^4.0.0 || ^5.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN mobx-react-lite#2.2.1 requires a peer of react#^16.8.0 but none is installed. You must install peer dependencies yourself.
npm WARN System32 No description
npm WARN System32 No repository field.
npm WARN System32 No README data
npm WARN System32 No license field.
How should I proceed?
I needed to be in the Swashbuckle.AspNetCore.ReDoc folder before running the command
npm i redoc
npm audit
=== npm audit security report ===
Manual Review
Some vulnerabilities require your attention to resolve
Visit https://go.npm.me/audit-guide for additional guidance
Moderate Prototype Pollution
Package hoek
Patched in > 4.2.0 < 5.0.0 || >= 5.0.3
Dependency of otp.js [dev]
Path otp.js > joi > hoek
More info https://nodesecurity.io/advisories/566
Low Denial of Service
Package mem
Patched in >=4.0.0
Dependency of react-native
Path react-native > #react-native-community/cli > metro >
metro-inspector-proxy > yargs > os-locale > mem
More info https://nodesecurity.io/advisories/1084
.......
npm audit fix --force
Error:
npm WARN using --force I sure hope you know what you are doing.
npm WARN commonmark-react-renderer#4.3.4 requires a peer of commonmark#^0.27.0 || ^0.26.0 || ^0.24.0 but none is installed. You must install peer dependencies yourself.
npm WARN eslint-config-airbnb#17.1.1 requires a peer of eslint#^4.19.1 || ^5.3.0 but none is installed. You must install peer dependencies yourself.
npm WARN eslint-config-airbnb-base#13.2.0 requires a peer of eslint#^4.19.1 || ^5.3.0 but none is installed. You must install peer dependencies yourself.
npm WARN eslint-plugin-react-native#3.7.0 requires a peer of eslint#^3.17.0 || ^4 || ^5 but none is installed. You must install peer dependencies yourself.
npm WARN jsdom#15.2.1 requires a peer of canvas#^2.5.0 but none is installed. You must install peer dependencies yourself.
npm WARN ws#7.2.3 requires a peer of bufferutil#^4.0.1 but none is installed. You must install peer dependencies yourself.
npm WARN ws#7.2.3 requires a peer of utf-8-validate#^5.0.2 but none is installed. You must install peer dependencies yourself.
npm WARN react-native-fast-image#7.0.2 requires a peer of react-native#^0.60.0 but none is installed. You must install peer dependencies yourself.
npm WARN react-native-keyboard-input#5.4.1 requires a peer of react-native#^0.57.3 but none is installed. You must install peer dependencies yourself.
npm WARN react-native-responsive-ui#1.1.1 requires a peer of react#16.0.0-alpha.6 but none is installed. You must install peer dependencies yourself.
npm WARN react-native-responsive-ui#1.1.1 requires a peer of react-native#^0.43.4 but none is installed. You must install peer dependencies yourself.
npm WARN react-navigation-drawer#1.4.0 requires a peer of react-native-screens#^1.0.0 || ^1.0.0-alpha but none is installed. You must install peer dependencies yourself.
npm WARN react-navigation-stack#1.10.3 requires a peer of react-native-screens#^1.0.0 || ^1.0.0-alpha but none is installed. You must install peer dependencies yourself
>
>
up to date in 20.457s
fixed 0 of 6 vulnerabilities in 1710074 scanned packages
6 vulnerabilities required manual review and could not be updated
anyone could help plz????
problem was with 'npm install' and 'npm yarn install'
This helped me
'choco install yarn'
'cd project_folder'
'yarn global add react-native-cli'
'yarn'
We are already using the latest version of angular ("#angular/core": "~8.2.5").
But when install, npm gives some warning about the module versions.
Please see the above console result :
npm WARN angular-pell#0.1.0 requires peer of #angular/common#^5.2.5 but none is installed. You must install peer dependencies yourself.
npm WARN angular-pell#0.1.0 reuqires peer of #angular/core#^5.2.5 but none is installed. You must install peer dependencies yourself.
npm WARN #angular/core#2.4.10 requires peer of rxjs#^5.0.1 but none is installed. You must install peer dependencies yourself.
What is about the npm warn?
Why npm provides some warns?
Try runing npm audit:
npm audit fix
I am working on angular 7 project. I tried to install
npm install --save #types/underscore
and i get following errors:
npm WARN #agm/core#1.0.0-beta.5 requires a peer of
#angular/common#^5.0.0 || ^6.0.0 but none is installed. You must
install peer dependencies yourself. npm WARN #agm/core#1.0.0-beta.5
requires a peer of #angular/core#^5.0.0 || ^6.0.0 but none is
installed. You must install peer dependencies yourself. npm WARN
#angular/cdk#6.4.7 requires a peer of #angular/core#>=6.0.0-beta.0
<7.0.0 but none is installed. You must install peer dependencies
yourself. npm WARN #angular/cdk#6.4.7 requires a peer of
#angular/common#>=6.0.0-beta.0 <7.0.0 but none is installed. You must
install peer dependencies yourself. npm WARN #angular/material#6.4.7
requires a peer of #angular/core#>=6.0.0-beta.0 <7.0.0 but none is
installed. You must install peer dependencies yourself. npm WARN
#angular/material#6.4.7 requires a peer of
#angular/common#>=6.0.0-beta.0 <7.0.0 but none is installed. You must
install peer dependencies yourself. npm WARN
#angular/platform-server#6.1.10 requires a peer of
#angular/animations#6.1.10 but none is installed. You must install
peer dependencies yourself. npm WARN #angular/platform-server#6.1.10
requires a peer of #angular/common#6.1.10 but none is installed. You
must install peer dependencies yourself. npm WARN
#angular/platform-server#6.1.10 requires a peer of
#angular/compiler#6.1.10 but none is installed. You must install peer
dependencies yourself. npm WARN #angular/platform-server#6.1.10
requires a peer of #angular/core#6.1.10 but none is installed. You
must install peer dependencies yourself. npm WARN
#angular/platform-server#6.1.10 requires a peer of
#angular/platform-browser#6.1.10 but none is installed. You must
install peer dependencies yourself. npm WARN
#angular/platform-server#6.1.10 requires a peer of
#angular/platform-browser-dynamic#6.1.10 but none is installed. You
must install peer dependencies yourself. npm WARN codelyzer#4.3.0
requires a peer of #angular/compiler#>=2.3.1 <7.0.0 || >6.0.0-beta
<7.0.0 but none is installed. You must install peer dependencies
yourself. npm WARN codelyzer#4.3.0 requires a peer of
#angular/core#>=2.3.1 <7.0.0 || >6.0.0-beta <7.0.0 but none is
installed. You must install peer dependencies yourself. npm WARN
#angular/animations#6.1.10 requires a peer of #angular/core#6.1.10 but
none is installed. You must install peer dependencies yourself. npm
WARN #angular/router#6.1.10 requires a peer of #angular/core#6.1.10
but none is installed. You must install peer dependencies yourself.
npm WARN #angular/router#6.1.10 requires a peer of
#angular/common#6.1.10 but none is installed. You must install peer
dependencies yourself. npm WARN #angular/router#6.1.10 requires a peer
of #angular/platform-browser#6.1.10 but none is installed. You must
install peer dependencies yourself. npm WARN ngx-toastr#9.1.0 requires
a peer of #angular/core#^6.0.0 but none is installed. You must install
peer dependencies yourself. npm WARN ngx-toastr#9.1.0 requires a peer
of #angular/common#^6.0.0 but none is installed. You must install peer
dependencies yourself. npm WARN ngx-toastr#9.1.0 requires a peer of
#angular/platform-browser#^6.0.0 but none is installed. You must
install peer dependencies yourself.
#types/underscore#1.8.9 added 1 package from 5 contributors and audited 40215 packages in 20.546s found 0 vulnerabilities
after it i get this error:
./src/app/services/pager.service.ts
Module not found: Error: Can't resolve 'underscore' in 'e:\xampp\htdocs\testapp\src\app\services
Please help me.
you need to install underscore into dependencies and #types/underscore into devDependencies.
npm i underscore --save
npm i #types/underscore --save-dev
then you can use it.