webpack-dev-server icon indicating copy to clipboard operation
webpack-dev-server copied to clipboard

Webpack peer dependency 1.3 or higher yet there is no webpack version 1.3

Open doliver3 opened this issue 10 years ago • 41 comments

Hi,

I see that there is a peer dependency to require webpack 1.3 or higher that has been checked in for over a year. "webpack": ">=1.3.0 <3"

As far as I can tell, there is no webpack version 1.3 as the highest is 1.12.9.
Can this peer dependency version be fixed so it does not require a non-existent version?

It is causing these warnings when I install: angular2-webpack-starter$ npm install --global webpack-dev-server /Users/beyondenergy/.npm-packages/bin/webpack-dev-server -> /Users/beyondenergy/.npm-packages/lib/node_modules/webpack-dev-server/bin/webpack-dev-server.js /Users/beyondenergy/.npm-packages/lib ├── UNMET PEER DEPENDENCY webpack@>=1.3.0 <3 └─┬ [email protected] └── UNMET PEER DEPENDENCY webpack@>=1.0.0 <3

npm WARN EPEERINVALID [email protected] requires a peer of webpack@>=1.3.0 <3 but none was installed. npm WARN EPEERINVALID [email protected] requires a peer of webpack@>=1.0.0 <3 but none was installed.

doliver3 avatar Dec 17 '15 23:12 doliver3

me too, I have the same error ! Update: I have succeed at installing webpack-dev-server with this version npm install --save-dev [email protected]

Iliyass avatar Dec 21 '15 10:12 Iliyass

I'm also receiving this error, Would this cause an internal issues with webpack?

sceptre12 avatar Dec 24 '15 17:12 sceptre12

@Iliyass it's not work for npm install [email protected] -g

Clish avatar Dec 29 '15 08:12 Clish

Same issue and solved. It's not about the version, just DO NOT use -g or --global, and install it into local project, it works. Though I still want to install it globally...

zsefvlol avatar Dec 29 '15 09:12 zsefvlol

It looks like the version of webpack that is installed by npm by default is too old and doesn't meet the version requirements (webpack@>=1.0.0 <3). Omitting -g has no effect for me.

fireproofsocks avatar Jan 04 '16 20:01 fireproofsocks

Peer Dependencies are no longer implicitly install as of node 5 check here. The latest version is Webpack is being installed through the devDependences. The peerDependencies code in package.json just hasn't been removed yet.

lenell16 avatar Jan 06 '16 23:01 lenell16

Thanks @lenell16. So if:

[t]his shifts the responsibility for fulfilling peer dependencies from library / framework / plugin maintainers to application authors

Shouldn't the latest version of webpack and webpack-dev-server just install with the basic install commands on the latest node and npm versions, and the beta non-resolving libraries be for edge developers?

For example using node 5.6.0 and npm 3.6.0 and run npm install webpack webpack-dev-server --save-dev on a brand new project I get unmet dependency errors.

Updates package.json:

  "devDependencies": {
    "webpack": "^2.1.0-beta.1",   // If I set this manually to the latest non-beta tag
                                  // "^1.12.13" it works fine.
    "webpack-dev-server": "^1.14.1"
  }

And gives the following npm console output:

├─┬ UNMET PEER DEPENDENCY [email protected]
│ ├── [email protected] 
│ ├── [email protected] 
│ ├── [email protected] 
│ ├─┬ [email protected] 
│ │ └── [email protected] 
│ ├── [email protected] 
│ ├── [email protected] 
│ ├─┬ [email protected] 
│ │ ├── [email protected] 
│ │ └── [email protected] 
│ ├─┬ [email protected] 
│ │ ├─┬ [email protected] 
│ │ │ └── [email protected] 
│ │ └─┬ [email protected] 
│ │   ├── [email protected] 
│ │   ├── [email protected] 
│ │   ├── [email protected] 
│ │   └── [email protected] 
│ ├─┬ [email protected] 
│ │ └── [email protected] 
│ ├─┬ [email protected] 
│ │ ├── [email protected] 
│ │ ├─┬ [email protected] 
│ │ │ └── [email protected] 
│ │ ├─┬ [email protected] 
│ │ │ ├── [email protected] 
│ │ │ ├── [email protected] 
│ │ │ └── [email protected] 
│ │ ├─┬ [email protected] 
│ │ │ └── [email protected] 
│ │ ├── [email protected] 
│ │ ├─┬ [email protected] 
│ │ │ ├─┬ [email protected] 
│ │ │ │ ├─┬ [email protected] 
│ │ │ │ │ └── [email protected] 
│ │ │ │ ├─┬ [email protected] 
│ │ │ │ │ └─┬ [email protected] 
│ │ │ │ │   └── [email protected] 
│ │ │ │ └── [email protected] 
│ │ │ ├─┬ [email protected] 
│ │ │ │ ├── [email protected] 
│ │ │ │ ├── [email protected] 
│ │ │ │ ├─┬ [email protected] 
│ │ │ │ │ ├── [email protected] 
│ │ │ │ │ └── [email protected] 
│ │ │ │ └─┬ [email protected] 
│ │ │ │   └── [email protected] 
│ │ │ ├── [email protected] 
│ │ │ ├─┬ [email protected] 
│ │ │ │ ├── [email protected] 
│ │ │ │ ├── [email protected] 
│ │ │ │ └── [email protected] 
│ │ │ ├── [email protected] 
│ │ │ ├─┬ [email protected] 
│ │ │ │ └── [email protected] 
│ │ │ ├── [email protected] 
│ │ │ ├── [email protected] 
│ │ │ └── [email protected] 
│ │ ├── [email protected] 
│ │ ├── [email protected] 
│ │ ├─┬ [email protected] 
│ │ │ └── [email protected] 
│ │ ├── [email protected] 
│ │ ├── [email protected] 
│ │ ├── [email protected] 
│ │ ├── [email protected] 
│ │ ├── [email protected] 
│ │ ├── [email protected] 
│ │ ├── [email protected] 
│ │ ├── [email protected] 
│ │ ├── [email protected] 
│ │ ├── [email protected] 
│ │ ├─┬ [email protected] 
│ │ │ ├── [email protected] 
│ │ │ └── [email protected] 
│ │ ├── [email protected] 
│ │ └─┬ [email protected] 
│ │   └── [email protected] 
│ ├── [email protected] 
│ ├── [email protected] 
│ ├─┬ [email protected] 
│ │ └── [email protected] 
│ ├── [email protected] 
│ ├─┬ [email protected] 
│ │ ├── [email protected] 
│ │ ├── [email protected] 
│ │ └─┬ [email protected] 
│ │   ├── [email protected] 
│ │   ├─┬ [email protected] 
│ │   │ ├─┬ [email protected] 
│ │   │ │ ├─┬ [email protected] 
│ │   │ │ │ ├── [email protected] 
│ │   │ │ │ └── [email protected] 
│ │   │ │ └── [email protected] 
│ │   │ └── [email protected] 
│ │   └── [email protected] 
│ ├─┬ [email protected] 
│ │ ├── [email protected] 
│ │ └─┬ [email protected] 
│ │   ├─┬ [email protected] 
│ │   │ ├── [email protected] 
│ │   │ └─┬ [email protected] 
│ │   │   ├─┬ [email protected] 
│ │   │   │ └── [email protected] 
│ │   │   ├── [email protected] 
│ │   │   ├─┬ [email protected] 
│ │   │   │ ├─┬ [email protected] 
│ │   │   │ │ └─┬ [email protected] 
│ │   │   │ │   ├── [email protected] 
│ │   │   │ │   ├── [email protected] 
│ │   │   │ │   └── [email protected] 
│ │   │   │ ├── [email protected] 
│ │   │   │ └── [email protected] 
│ │   │   ├── [email protected] 
│ │   │   ├── [email protected] 
│ │   │   ├── [email protected] 
│ │   │   ├─┬ [email protected] 
│ │   │   │ └── [email protected] 
│ │   │   ├── [email protected] 
│ │   │   ├─┬ [email protected] 
│ │   │   │ ├─┬ [email protected] 
│ │   │   │ │ └── [email protected] 
│ │   │   │ └── [email protected] 
│ │   │   ├─┬ [email protected] 
│ │   │   │ ├── [email protected] 
│ │   │   │ └── [email protected] 
│ │   │   └─┬ [email protected] 
│ │   │     ├── [email protected] 
│ │   │     └── [email protected] 
│ │   ├── [email protected] 
│ │   ├─┬ [email protected] 
│ │   │ ├── [email protected] 
│ │   │ └─┬ [email protected] 
│ │   │   ├─┬ [email protected] 
│ │   │   │ └── [email protected] 
│ │   │   ├─┬ [email protected] 
│ │   │   │ └── [email protected] 
│ │   │   ├─┬ [email protected] 
│ │   │   │ ├── [email protected] 
│ │   │   │ ├─┬ [email protected] 
│ │   │   │ │ └── [email protected] 
│ │   │   │ └─┬ [email protected] 
│ │   │   │   ├── [email protected] 
│ │   │   │   ├─┬ [email protected] 
│ │   │   │   │ ├── [email protected] 
│ │   │   │   │ └─┬ [email protected] 
│ │   │   │   │   └── [email protected] 
│ │   │   │   ├── [email protected] 
│ │   │   │   └── [email protected] 
│ │   │   ├─┬ [email protected] 
│ │   │   │ ├── [email protected] 
│ │   │   │ ├── [email protected] 
│ │   │   │ ├── [email protected] 
│ │   │   │ └── [email protected] 
│ │   │   ├─┬ [email protected] 
│ │   │   │ ├── [email protected] 
│ │   │   │ ├── [email protected] 
│ │   │   │ ├── [email protected] 
│ │   │   │ ├─┬ [email protected] 
│ │   │   │ │ └── [email protected] 
│ │   │   │ ├── [email protected] 
│ │   │   │ ├── [email protected] 
│ │   │   │ ├─┬ [email protected] 
│ │   │   │ │ └── [email protected] 
│ │   │   │ ├─┬ [email protected] 
│ │   │   │ │ ├─┬ [email protected] 
│ │   │   │ │ │ ├── [email protected] 
│ │   │   │ │ │ ├── [email protected] 
│ │   │   │ │ │ ├─┬ [email protected] 
│ │   │   │ │ │ │ └── [email protected] 
│ │   │   │ │ │ ├── [email protected] 
│ │   │   │ │ │ └── [email protected] 
│ │   │   │ │ ├─┬ [email protected] 
│ │   │   │ │ │ └── [email protected] 
│ │   │   │ │ ├─┬ [email protected] 
│ │   │   │ │ │ ├── [email protected] 
│ │   │   │ │ │ ├─┬ [email protected] 
│ │   │   │ │ │ │ └── [email protected] 
│ │   │   │ │ │ ├── [email protected] 
│ │   │   │ │ │ └── [email protected] 
│ │   │   │ │ └─┬ [email protected] 
│ │   │   │ │   └── [email protected] 
│ │   │   │ ├─┬ [email protected] 
│ │   │   │ │ ├── [email protected] 
│ │   │   │ │ ├── [email protected] 
│ │   │   │ │ ├── [email protected] 
│ │   │   │ │ └── [email protected] 
│ │   │   │ ├─┬ [email protected] 
│ │   │   │ │ ├── [email protected] 
│ │   │   │ │ ├─┬ [email protected] 
│ │   │   │ │ │ ├── [email protected] 
│ │   │   │ │ │ ├── [email protected] 
│ │   │   │ │ │ └── [email protected] 
│ │   │   │ │ └─┬ [email protected] 
│ │   │   │ │   ├── [email protected] 
│ │   │   │ │   ├── [email protected] 
│ │   │   │ │   ├── [email protected] 
│ │   │   │ │   ├── [email protected] 
│ │   │   │ │   ├── [email protected] 
│ │   │   │ │   ├── [email protected] 
│ │   │   │ │   └── [email protected] 
│ │   │   │ ├── [email protected] 
│ │   │   │ ├── [email protected] 
│ │   │   │ ├── [email protected] 
│ │   │   │ ├─┬ [email protected] 
│ │   │   │ │ └── [email protected] 
│ │   │   │ ├── [email protected] 
│ │   │   │ ├── [email protected] 
│ │   │   │ ├── [email protected] 
│ │   │   │ ├── [email protected] 
│ │   │   │ ├── [email protected] 
│ │   │   │ └── [email protected] 
│ │   │   ├─┬ [email protected] 
│ │   │   │ └─┬ [email protected] 
│ │   │   │   ├─┬ [email protected] 
│ │   │   │   │ └── [email protected] 
│ │   │   │   ├── [email protected] 
│ │   │   │   ├─┬ [email protected] 
│ │   │   │   │ └─┬ [email protected] 
│ │   │   │   │   ├── [email protected] 
│ │   │   │   │   └── [email protected] 
│ │   │   │   ├─┬ [email protected] 
│ │   │   │   │ └── [email protected] 
│ │   │   │   └── [email protected] 
│ │   │   ├── [email protected] 
│ │   │   ├─┬ [email protected] 
│ │   │   │ ├── [email protected] 
│ │   │   │ ├─┬ [email protected] 
│ │   │   │ │ └── [email protected] 
│ │   │   │ └── [email protected] 
│ │   │   └─┬ [email protected] 
│ │   │     ├── [email protected] 
│ │   │     ├─┬ [email protected] 
│ │   │     │ └─┬ [email protected] 
│ │   │     │   └─┬ [email protected] 
│ │   │     │     ├── [email protected] 
│ │   │     │     └── [email protected] 
│ │   │     ├── [email protected] 
│ │   │     ├─┬ [email protected] 
│ │   │     │ ├── [email protected] 
│ │   │     │ ├── [email protected] 
│ │   │     │ ├── [email protected] 
│ │   │     │ ├── [email protected] 
│ │   │     │ └── [email protected] 
│ │   │     ├─┬ [email protected] 
│ │   │     │ └─┬ [email protected] 
│ │   │     │   ├─┬ [email protected] 
│ │   │     │   │ └── [email protected] 
│ │   │     │   ├── [email protected] 
│ │   │     │   ├─┬ [email protected] 
│ │   │     │   │ └─┬ [email protected] 
│ │   │     │   │   ├── [email protected] 
│ │   │     │   │   └── [email protected] 
│ │   │     │   ├─┬ [email protected] 
│ │   │     │   │ └── [email protected] 
│ │   │     │   └── [email protected] 
│ │   │     └── [email protected] 
│ │   ├── [email protected] 
│ │   ├─┬ [email protected] 
│ │   │ └── [email protected] 
│ │   ├─┬ [email protected] 
│ │   │ └── [email protected] 
│ │   ├── [email protected] 
│ │   └─┬ [email protected] 
│ │     └─┬ [email protected] 
│ │       └─┬ [email protected] 
│ │         ├── [email protected] 
│ │         └── [email protected] 
│ ├─┬ [email protected] 
│ │ └── [email protected] 
│ └─┬ [email protected] 
│   ├── [email protected] 
│   ├─┬ [email protected] 
│   │ └── [email protected] 
│   ├─┬ [email protected] 
│   │ └── [email protected] 
│   ├─┬ [email protected] 
│   │ └─┬ [email protected] 
│   │   └── [email protected] 
│   ├─┬ [email protected] 
│   │ ├─┬ [email protected] 
│   │ │ └── [email protected] 
│   │ └── [email protected] 
│   ├── [email protected] 
│   └── [email protected] 
└─┬ [email protected] 
  ├─┬ [email protected] 
  │ ├─┬ [email protected] 
  │ │ └── [email protected] 
  │ ├── [email protected] 
  │ ├─┬ [email protected] 
  │ │ └── [email protected] 
  │ ├─┬ [email protected] 
  │ │ └── [email protected] 
  │ ├── [email protected] 
  │ └── [email protected] 
  ├── [email protected] 
  ├─┬ [email protected] 
  │ ├─┬ [email protected] 
  │ │ └── [email protected] 
  │ ├── [email protected] 
  │ ├── [email protected] 
  │ ├── [email protected] 
  │ ├── [email protected] 
  │ ├── [email protected] 
  │ ├── [email protected] 
  │ ├── [email protected] 
  │ ├── [email protected] 
  │ ├─┬ [email protected] 
  │ │ └── [email protected] 
  │ ├── [email protected] 
  │ ├── [email protected] 
  │ ├── [email protected] 
  │ ├─┬ [email protected] 
  │ │ └── [email protected] 
  │ ├── [email protected] 
  │ ├── [email protected] 
  │ ├─┬ [email protected] 
  │ │ ├── [email protected] 
  │ │ └── [email protected] 
  │ ├── [email protected] 
  │ ├── [email protected] 
  │ ├─┬ [email protected] 
  │ │ ├── [email protected] 
  │ │ └── [email protected] 
  │ ├── [email protected] 
  │ ├─┬ [email protected] 
  │ │ └── [email protected] 
  │ ├── [email protected] 
  │ └── [email protected] 
  ├─┬ [email protected] 
  │ ├── [email protected] 
  │ └── [email protected] 
  ├─┬ [email protected] 
  │ └── [email protected] 
  ├─┬ [email protected] 
  │ ├─┬ [email protected] 
  │ │ └── [email protected] 
  │ ├── [email protected] 
  │ ├── [email protected] 
  │ └── [email protected] 
  ├─┬ [email protected] 
  │ ├─┬ [email protected] 
  │ │ └─┬ [email protected] 
  │ │   └── [email protected] 
  │ └── [email protected] 
  ├─┬ [email protected] 
  │ ├─┬ [email protected] 
  │ │ └── [email protected] 
  │ ├── [email protected] 
  │ ├── [email protected] 
  │ ├── [email protected] 
  │ └─┬ [email protected] 
  │   └── [email protected] 
  ├── [email protected] 
  ├─┬ [email protected] 
  │ └── [email protected] 
  ├── UNMET PEER DEPENDENCY webpack@>=1.0.0 <3
  └─┬ [email protected] 
    └── [email protected] 

npm WARN [email protected] requires a peer of webpack@>=1.3.0 <3 but none was installed.
npm WARN [email protected] requires a peer of webpack@>=1.0.0 <3 but none was installed.

mummybot avatar Feb 22 '16 15:02 mummybot

-- UNMET PEER DEPENDENCY webpack@^1.3.0 Same here...Ubuntu 14.04.3 LTS...

ehzawad avatar Mar 11 '16 08:03 ehzawad

Same here using npm 3.6.0 and node 5.7.1

douglascorrea avatar Mar 16 '16 05:03 douglascorrea

+1 on this issue! Got the same problem on the stable versions using the -g flags, without those it seem to work.

Using: webpack 1.12.14 and webpack-dev-server: 1.14.1

Can't use this combination global even though they are the last stable releases. Which seems to me like a bug, or should be explained somewhere if there is a reason why it cannot be used global.

cablegunmaster avatar Mar 22 '16 14:03 cablegunmaster

Same issue here. For betas it's because webpack@>=2.0.3-beta resolves to webpack@^1.12.14 and etc. Looks like an old bug in npm. Even there http://semver.npmjs.com/ it just gives no results. Funny, but e.g. >=1.0.0-beta1 works fine. Interested in beta (e.g. @mummybot) you should try this commit (isn't released at the moment) https://github.com/webpack/webpack-dev-server/commit/202165717b974392c3048e52fad1e83468129438. It works.

hesalx avatar Mar 25 '16 01:03 hesalx

I was having the same issue, and came across this other closed PR (https://github.com/webpack/webpack-dev-server/issues/429). Not quite expert-level enough to say why this works, but it does. Possibly it's because my global npm dir has always been ~/.npm (back long before npm was 3.x when they changed some dependency management)??

bigdawggi avatar Mar 28 '16 17:03 bigdawggi

+1 No error installing it locally, but globally. webpack version is 1.12.14, though npm install -g webpack-dev-server tells

/usr/local/bin/webpack-dev-server -> /usr/local/lib/node_modules/webpack-dev-server/bin/webpack-dev-server.js
/usr/local/lib
├── UNMET PEER DEPENDENCY webpack@>=1.3.0 <3
└─┬ [email protected] 
  └── UNMET PEER DEPENDENCY webpack@1 || ^2.1.0-beta

wataruoguchi avatar Apr 03 '16 00:04 wataruoguchi

Fix:

$ npm install -g webpack
$ npm install -g webpack-dev-server    <- will error
$ webpack-dev-server                   <- seems to work fine reguardless

jakeNiemiec avatar Apr 06 '16 00:04 jakeNiemiec

Nice link to http://semver.npmjs.com/ @arantir ! The reason >=1.0.0-beta1 works fine is that it is excluding the offending beta tag 2.0.0-beta, not sure why given there is no ^ to fix it to the major versions and 2 is greater than 1.

Generally I am not keen on installing webpack and webpack-dev-server globally. IMHO it is better to have all environmental packages included as part of a project so that setup for different developers is a known quantity.

My question to the webpack-dev-server dev contributors: why the have published the beta as the latest tag on npm such that npm install webpack-dev-server installs this rather than the latest stable release 1.14.1?

mummybot avatar Apr 06 '16 08:04 mummybot

Same issue here! Fedora 23, Node.js 5.10.1, NPM 3.8.5.

npm WARN [email protected] requires a peer of webpack@>=1.3.0 <3 but none was installed.
npm WARN [email protected] requires a peer of webpack@1 || ^2.1.0-beta but none was installed.

wouterbeek avatar Apr 07 '16 20:04 wouterbeek

The same issue when I install webpack with newest version --2.1.0-beta.6. Node.js-- 5.4.0, Npm --3.3.12

npm WARN EPEERINVALID [email protected] requires a peer of webpack@>=1.3.0 <3 but none was installed.
npm WARN EPEERINVALID [email protected] requires a peer of webpack@1 || ^2.1.0-beta but none was installed.

mengxiw avatar May 04 '16 11:05 mengxiw

Getting this unmet peer dependency message

➜ ~ npm install webpack-dev-server -g /usr/local/bin/webpack-dev-server -> /usr/local/lib/node_modules/webpack-dev-server/bin/webpack-dev-server.js /usr/local/lib ├── UNMET PEER DEPENDENCY webpack@>=1.3.0 <3 └─┬ [email protected] └── UNMET PEER DEPENDENCY webpack@1 || ^2.1.0-beta

npm WARN [email protected] requires a peer of webpack@>=1.3.0 <3 but none was installed. npm WARN [email protected] requires a peer of webpack@1 || ^2.1.0-beta but none was installed.

raparlasiva avatar May 16 '16 21:05 raparlasiva

I think the solution is to install both webpack and webpack-dev-server at the same time. If you already have webpack installed, you don't need to uninstall it first. This was the solution for me.

npm install --global webpack webpack-dev-server

janaagaard75 avatar May 17 '16 07:05 janaagaard75

@janaagaard75 That suppressed the warning, but did not resolve the version missmatch. You'll get the same result installing them seperately, only diff is the warning.

kholbekj avatar May 19 '16 11:05 kholbekj