Webpack-dev-server: After installing [email protected] globally

Created on 30 Jul 2016  ยท  12Comments  ยท  Source: webpack/webpack-dev-server

When I try to to do the same with webpack-dev-server I get :
UNMET PEER DEPENDENCY webpack@1 || ^2.1.0-beta

Most helpful comment

If you really want to install it globally, putting everything on one line seems to work: npm install -g webpack webpack-dev-server.

Closing this since now I'm sure I can't do anything about this issue in dev-server.

All 12 comments

Have you also installed webpack globally? npm install webpack -g

I did but I somehow fixed the problem after removing the fish shell. I don't know why this fixed it but all seems well now.

Doug Ferron

e: [email protected]


From: Kees Kluskens [email protected]
Sent: 03 August 2016 18:55
To: webpack/webpack-dev-server
Cc: DougFerron; Author
Subject: Re: [webpack/webpack-dev-server] After installing [email protected] globally (#541)

Have you also installed webpack globally? npm install webpack -g

You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHubhttps://github.com/webpack/webpack-dev-server/issues/541#issuecomment-237310450, or mute the threadhttps://github.com/notifications/unsubscribe-auth/ACFENCtkr4OJn_tZtv0zIeDV-G9iQ4v1ks5qcNYFgaJpZM4JY2O3.

Cool. Could you close the issue then?

I just hit this exact problem too, but I've installed [email protected] globally. I see the following:

X:\>npm install webpack -g
C:\Users\<username>\AppData\Roaming\npm\webpack -> C:\Users\<username>\AppData\Roaming\npm\node_modules\webpack\bin\webpack.js
C:\Users\<username>\AppData\Roaming\npm
`-- [email protected]

npm WARN optional Skipping failed optional dependency /webpack/chokidar/fsevents:
npm WARN notsup Not compatible with your operating system or architecture: [email protected]

X:\>npm install webpack-dev-server -g
C:\Users\<username>\AppData\Roaming\npm\webpack-dev-server -> C:\Users\<username>\AppData\Roaming\npm\node_modules\webpack-dev-server\bin\webpack-dev-server.js
C:\Users\<username>\AppData\Roaming\npm
+-- 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.

X:\>npm -v
3.10.6

X:\>node -v
v4.4.5

Could you guys try it again with [email protected]? That version was just released, and should fix these issues.

$ sudo npm install --global webpack
/usr/local/bin/webpack -> /usr/local/lib/node_modules/webpack/bin/webpack.js
/usr/local/lib
โ””โ”€โ”€ [email protected] 

npm WARN optional Skipping failed optional dependency /webpack/chokidar/fsevents:
npm WARN notsup Not compatible with your operating system or architecture: [email protected]

$ sudo npm install --global webpack-dev-server
/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.

Unfortunately not fixed, as it seems. Webpack is installed globally.

I installed [email protected], still not fixed

dogan@DOGAN-PC maker-maker
$ npm install -g webpack
C:\Users\dogan\AppData\Roaming\npm\webpack -> C:\Users\dogan\AppData\Roaming\npm\node_modules\webpack\bin\webpack.js
C:\Users\dogan\AppData\Roaming\npm
`-- [email protected]

npm WARN optional Skipping failed optional dependency /webpack/chokidar/fsevents:
npm WARN notsup Not compatible with your operating system or architecture: [email protected]

dogan@DOGAN-PC maker-maker
$ npm install -g webpack-dev-server
C:\Users\dogan\AppData\Roaming\npm\webpack-dev-server -> C:\Users\dogan\AppData\Roaming\npm\node_modules\webpack-dev-server\bin\webpack-dev-server.js
C:\Users\dogan\AppData\Roaming\npm
+-- 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.

Same problem here, OSX:

$ npm install -g webpack
/usr/local/bin/webpack -> /usr/local/lib/node_modules/webpack/bin/webpack.js
/usr/local/lib
โ””โ”€โ”€ [email protected]

$ npm install -g webpack-dev-server
/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.

I'm having similar if not same issue. I installed Webpack globally (using npm install --global webpack).

So do you still have this issue when you don't install it globally? You should not install these packages globally.

In my own tests, it seems to work when installing it in a project, but I get the same error when using it globally. That doesn't really sound like an issue I can fix in webpack-dev-server.

If you really want to install it globally, putting everything on one line seems to work: npm install -g webpack webpack-dev-server.

Closing this since now I'm sure I can't do anything about this issue in dev-server.

I also have this issue.I install globally webpack & webpack-dev-server ,but it still occurs "npm WARN [email protected] requires a peer of webpack@>=1.3.0 <3 but none was installed".
How to solve this issue?

Was this page helpful?
0 / 5 - 0 ratings

Related issues

MJ111 picture MJ111  ยท  3Comments

da2018 picture da2018  ยท  3Comments

movie4 picture movie4  ยท  3Comments

daryn-k picture daryn-k  ยท  3Comments

StephanBijzitter picture StephanBijzitter  ยท  3Comments