Skip to content

Cannot install this package in a nextJS application #5

@AmirHossein-z

Description

@AmirHossein-z

Hi. The issue I got is that when I want to install it in a Nextjs V15.3.1, I get this error:

npm error code ERESOLVE
npm error ERESOLVE unable to resolve dependency tree
npm error
npm error While resolving: project@0.1.0
npm error Found: next@15.3.3
npm error node_modules/next
npm error   next@"^15.3.1" from the root project
npm error
npm error Could not resolve dependency:
npm error peer next@"^14.0.0" from loadzilla@0.0.5
npm error node_modules/loadzilla
npm error   loadzilla@"*" 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 /home/user/.npm/_logs/2025-06-01T10_48_32_217Z-eresolve-report.txt
npm error A complete log of this run can be found in: /home/user/.npm/_logs/2025-06-01T10_48_32_217Z-debug-0.log

so I think updating package.json and add peerDependency like this will solve the result:

  "peerDependencies": {
    "next": "^14.0.0 || ^15.0.0",
    "react": "^18.2.0 || ^19.0.0 ",
    "react-dom": "^18.2.0 || ^19.0.0"
  },

At last, thank you for providing the packages that ease the retry mechanism for lazy loading components in Next.js.

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions