npm unmet peer dependency on the package being installed - node.js

I'm a bit baffled as to why I get an unmet peer dependency on the exact package I'm trying to install.
I run:
npm install webpack#2.1.0-beta.27 --save-dev
Result:
angular2-webpack-starter#5.1.1 C:\src\angular2-webpack\angular2-webpack-starter
-- UNMET PEER DEPENDENCY webpack#2.1.0-beta.27
I'm running the latest version of node and npm.
Any help would be appreciated. Thanks.
Full output:
-- UNMET PEER DEPENDENCY webpack#2.1.0-beta.27
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents#^1.0.0 (node_modules\chokidar\node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents#1.0.15: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
npm WARN extract-text-webpack-plugin#1.0.1 requires a peer of webpack#^1.9.11 but none was installed.
npm ERR! code 1

The error isn't actually coming from Webpack, but instead (as we determined in the comments) it came from outdated versions of extract-text-webpack-plugin and bootstrap-loader. Since you're using Webpack 2, you'll need to use the v2 beta versions of your plugins.
To fix this, upgrade:
extract-text-webpack-plugin to v2.0.0-beta.4
bootstrap-loader to v2.0.0-beta.16.
It's a bit strange that npm highlighted Webpack as the missing peer dependency, but npm does tend to have quite unclear error messages that take a while to get used to.

Related

Why does bootstrap-vue require me to install jquery and webpack manually, even though I have them installed globally?

Im setting up a new bootstrap-vue project using vue-cli by running the command
vue init bootstrap-vue/webpack-simple my-project.
Each time I start a new project, I have to install all the dependencies in the output below by hand.
Am I missing something?
I already have installed jquery/webpack etc globally using npm install -g webpack but whenever I run the command I get the following output:
npm WARN ajv-keywords#3.2.0 requires a peer of ajv#^6.0.0 but none is
installed. You must install peer dependencies yourself.
npm WARN babel-loader#6.4.1 requires a peer of webpack#1 || 2 || ^2.1.0-
beta || ^2.2.0-rc but none is installed. You must install peer
dependencies
yourself.
npm WARN bootstrap#4.2.1 requires a peer of jquery#1.9.1 - 3 but none is
installed. You must install peer dependencies yourself.
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"})
Im pretty new to understanding npm and js dependency management, and it just doesn't make sense that every time I spawn up a new project, I have to manually go down the line and install the various dependencies by hand. Am I missing something?

NPM Warnings "eslint X requires a peer of Y but none is installed. You must install peer dependencies yourself."

Whenever I install a package I keep getting these npm warnings regarding eslint. I've tried every form of installing the latest version of eslint and babel-eslint that I can think of, but the same warning messages show every time. For instance if I run
npm i babel-eslint
The follwing shows:
npm WARN eslint-config-react-app#2.1.0 requires a peer of babel-eslint#^7.2.3 but none is installed. You must install peer dependencies yourself.
npm WARN eslint-config-react-app#2.1.0 requires a peer of eslint#^4.1.1 but none is installed. You must install peer dependencies yourself.
npm WARN eslint-loader#1.9.0 requires a peer of eslint#>=1.6.0 <5.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN eslint-plugin-jsx-a11y#5.1.1 requires a peer of eslint#^2.10.2 || ^3 || ^4 but none is installed. You must install peer dependencies yourself.
npm WARN firebase-functions#2.1.0 requires a peer of firebase-admin#~6.0.0 but none is installed. You must install peer dependencies yourself.
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"})
Despite the warnings it shows that the package added. But if it's added then why do those warnings persist?
babel-eslint#10.0.1
removed 181 packages and updated 1 package in 50.436s
One thing I notice whenever I install via NPM is that at first the first line of the console shows
[..................] - rollbackFailedOptional: verb npm-session 1b360c8942244b42
Although it does go on to install the package, with those subsequent warning errors. Could anyone suggest a reason for all these errors and a possible way to fix them?

Getting warnings while installing npm

npm WARN extract-text-webpack-plugin#1.0.1 requires a peer of webpack#^1.9.11 but none is installed. You must install peer dependencies yourself.
npm WARN karma-webpack#1.7.0 requires a peer of webpack#^1.4.0 but none is installed. You must install peer dependencies yourself.
npm WARN react-native#0.49.2 requires a peer of react#16.0.0-beta.5 but none is installed. You must install peer dependencies yourself.
npm WARN sass-loader#3.2.0 requires a peer of webpack#^1.12.6 but none is installed. You must install peer dependencies yourself.
npm WARN webpack-dev-middleware#1.12.0 requires a peer of webpack#^1.0.0 || ^2.0.0 || ^3.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN webpack-dev-server#2.0.0-beta requires a peer of webpack#>=2.0.3-beta <3 but none is installed. You must install peer dependencies yourself.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents#1.1.2 (node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents#1.1.2: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
I'm getting above mentioned warnings while doing npm install. Although, these are just warnings and are not gonna impact application. But, I want to know what is leading to these warnings.
I am using npm `version 5.4.2`
node version is 6.11.4
webpack 2.1.0-beta.22
first of all last 2 warnings are just for those user who are using
other than mac.(Even I wasn't able to resolve them)
Now coming to other warnings.
you can either downgrade your webpack version or upgrade everything to latest versions.
They are compatible with each other as I have also done that.
In my opinion upgrading all your components is a better way to solve this.
This module will be helpful while upgrading it npm-check

UNMET PEER DEPENDENCY webpack#3.5.5 and babel-loader error

I'm having trouble installing webpack dev with the following command: npm i --save-dev webpack
Webpack is installed succesfully on my computer as npm i webpack -g #3.5.5 so no issues here.
When I run npm i --save-dev webpack I get a babel-core error reading the following; it will not let me proceed without usinf webpack 1, 2 pr 2.1.0-beta
I cannot get past this and have search stackoverflow and multiple sites.
In my situation, I'm using it with Redux on Windows.
This is my error.
`-- UNMET PEER DEPENDENCY webpack#3.5.5
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents#^1.0.0 (node_modules\ch
okidar\node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents#
1.1.2: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"}
)
npm WARN babel-loader#6.2.10 requires a peer of webpack#1 || 2 || ^2.1.0-beta ||
^2.2.0-rc but none was installed.
npm WARN prj400r#1.0.0 No description
npm WARN prj400r#1.0.0 No repository field.
Highlighting the babel-core error as being the most problematic. Any workaround?
Update babel-loader to version 7.x.x and it should solve your problem. The previous versions required webpack 1 and this support was dropped in version 7
Release v7.0.0

Ionic 2 Final + AngularFire2 : UNMET PEER DEPENDENCY rxjs#5.0.0-beta.12

On Windows 10 with nodejs 7.5.0, after installing the ionic 2 final version there is a peer dependency error (rxjs#5.0.0-beta.12) when installing angularfire2.
Tried on Linux but the result was the same.
ionic -v
2.2.1
npm install angularfire2 --save
ionic-hello-world# D:\nodejs\unRated
+-- angularfire2#2.0.0-beta.7
-- UNMET PEER DEPENDENCY rxjs#5.0.0-beta.12
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents#^1.0.0 (node_modules\chokidar\node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents#1.0.17: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
npm WARN angularfire2#2.0.0-beta.7 requires a peer of rxjs#^5.0.1 but none was installed.
Anyone with the same issue on the final ionic 2 release?
You have to install AngularFire 2.0.0-beta.6 to make it working.
npm install firebase#3.3.0 angularfire2#2.0.0-beta.6
Check this blog for more information https://chriztalk.com/ionic-2-and-firebase/

Resources