ms87
ms87

Reputation: 17492

npm unmet peer dependency on the package being installed

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 [email protected] --save-dev

Result:

[email protected] C:\src\angular2-webpack\angular2-webpack-starter

-- UNMET PEER DEPENDENCY [email protected]

I'm running the latest version of node and npm.

Any help would be appreciated. Thanks.

Full output:

-- UNMET PEER DEPENDENCY [email protected]
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 [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
npm WARN [email protected] requires a peer of webpack@^1.9.11 but none was installed.
npm ERR! code 1

Upvotes: 2

Views: 465

Answers (1)

Aurora0001
Aurora0001

Reputation: 13547

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.

Upvotes: 2

Related Questions