Skip to content

Update the installation guide to address the NPM 7+ ERESOLVE peer dependency conflicts #20618

@siddharthchauhan3128

Description

@siddharthchauhan3128

Have you used AI?

None

Description

The Problem

While running npm install --save-dev webpack on the current repo, users on NPM 7/8+ encounters an ERESOLVE error due to peer dependency mismatch between pug-loader and pug

Error log

PS C:\OpenSource\webpack> npm install --save-dev webpack
npm error code ERESOLVE
npm error ERESOLVE unable to resolve dependency tree
npm error
npm error While resolving: webpack@5.105.4
npm error Found: pug@3.0.3
npm error node_modules/pug
npm error   dev pug@"^3.0.3" from the root project
npm error
npm error Could not resolve dependency:
npm error peer pug@"^2.0.0" from pug-loader@2.4.0
npm error node_modules/pug-loader
npm error   dev pug-loader@"^2.4.0" from the root project
npm error
npm error Fix the upstream dependency conflict, or retry
npm error this command with --force or --legacy-peer-deps
npm error to accept an incorrect (and potentially broken) dependency resolution.
npm error
npm error
npm error For a full report see:
npm error C:\Users\SIDDHARTH\AppData\Local\npm-cache\_logs\2026-03-10T16_08_35_371Z-eresolve-report.txt
npm error A complete log of this run can be found in: C:\Users\SIDDHARTH\AppData\Local\npm-cache\_logs\2026-03-10T16_08_35_371Z-debug-0.log

Problem Solution

I would like to update the README.md to include a "Troubleshooting" or "Installation Notes" section. This section will advise new contributors to use the --legacy-peer-deps flag if they encounter environment-specific peer dependency conflicts.

I have the fix ready—please let me know if I should proceed with a Pull Request!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions