pugjs / pug-loader

Pug loader module for Webpack
MIT License
425 stars 119 forks source link

warning " > pug-loader@2.4.0" has incorrect peer dependency "pug@^2.0.0". #126

Open nypinstripes opened 4 years ago

nypinstripes commented 4 years ago

Hey,

Library still works great with pug@3.0.0, just wanted to see if we can get the peer dependency bumped to remove the warning, cheers.

@sokra @TimothyGu @simon04

nypinstripes commented 4 years ago

@mekwall @leenty @bpiwowar @ForbesLindesay Hi, library still working good under pug@3.0.0 just wanted to see if we can get the peer dependency bumped to remove the warning, cheers.

noahbrenner commented 4 years ago

@ForbesLindesay What do you think of the linked PR for fixing this issue? It would be great to have pug@3 officially supported.

webdiscus commented 4 years ago

Hallo @sokra,

do You can please update in peerDependencies "pug": "^3.0.0" or merge the PR von @mekwall https://github.com/pugjs/pug-loader/pull/128/commits/b0b76c08cea8cbcd65c94047498cb9d45c1c91f4

We all, 100500 people need your official support to avoid the Warning. Könntest Du bitte nur eine Zeile anpassen?

LG from Köln

webdiscus commented 3 years ago

Up!

phanect commented 3 years ago

Now this issue causes a dependency error on npm install and prevents package installation. This is caused by a breaking change in npm v7.

$ cat package.json
{
  // ...
  "dependencies": {
    // ...
    "pug": "^3.0.0",
    "pug-loader": "^2.4.0",
  },
  // ...
}

$ npm install
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR! 
npm ERR! While resolving: ***@1.0.0
npm ERR! Found: pug@3.0.2
npm ERR! node_modules/pug
npm ERR!   pug@"^3.0.0" from the root project
npm ERR! 
npm ERR! Could not resolve dependency:
npm ERR! peer pug@"^2.0.0" from pug-loader@2.4.0
npm ERR! node_modules/pug-loader
npm ERR!   dev pug-loader@"^2.4.0" from the root project
npm ERR! 
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force, or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.
npm ERR! 
npm ERR! See /home/jogawa/.npm/eresolve-report.txt for a full report.

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/jogawa/.npm/_logs/2021-03-11T06_56_38_776Z-debug.log

Workaround: add --legacy-peer-deps option

$ npm install --legacy-peer-deps

Update: I switched to pug-plain-loader since pug-loader seems unmaintained.

webdiscus commented 3 years ago

For all who want use the pug-loader compatible with Webpack 5 and Pug 3 propose try to use the alternative pug-loader This pug loader support webpack aliases, watching of changes in all dependencies and is many time faster.