Skip to content

fix: add default exports condition for pnpm v10 compatibility#279

Open
timdamen wants to merge 1 commit intomainfrom
fix/pnpm-exports
Open

fix: add default exports condition for pnpm v10 compatibility#279
timdamen wants to merge 1 commit intomainfrom
fix/pnpm-exports

Conversation

@timdamen
Copy link
Copy Markdown
Collaborator

@timdamen timdamen commented Apr 1, 2026

Summary

  • Adds a "default" fallback condition to the package.json exports field, fixing ERR_PACKAGE_PATH_NOT_EXPORTED when installing with pnpm v10

Root cause

The exports field only had an "import" condition. When nuxt module add performs a CJS-style require.resolve() check after installation, pnpm v10's strict module resolution (which ignores the main field when exports is present) fails because there's no matching CJS condition. Adding "default" provides a catch-all fallback that works for both ESM and CJS resolution.

Closes #274

Fixes ERR_PACKAGE_PATH_NOT_EXPORTED when installing with pnpm v10.
The exports field only had an "import" condition, causing CJS resolution
to fail during `nuxt module add`.
@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Apr 1, 2026

Warning

Rate limit exceeded

@timdamen has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 21 minutes and 24 seconds before requesting another review.

Your organization is not enrolled in usage-based pricing. Contact your admin to enable usage-based pricing to continue reviews beyond the rate limit, or try again in 21 minutes and 24 seconds.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: d01e8b06-9500-4049-beb5-5cf4c38b76d4

📥 Commits

Reviewing files that changed from the base of the PR and between 84670ce and d0c3c58.

📒 Files selected for processing (1)
  • package.json
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/pnpm-exports

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@pkg-pr-new
Copy link
Copy Markdown

pkg-pr-new bot commented Apr 1, 2026

Open in StackBlitz

npm i https://pkg.pr.new/@nuxt/a11y@279

commit: d0c3c58

@timdamen timdamen requested a review from danielroe April 1, 2026 19:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ERR_PACKAGE_PATH_NOT_EXPORTED when installing with pnpm v10

1 participant