Skip to content

fix: require.resolve for packages with exports field in package.json #5579

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Sep 30, 2021

Conversation

rigor789
Copy link
Member

PR Checklist

What is the current behavior?

If a dependency has an exports field in it's package.json, the CLI would fail in some cases where we require.resolve(/package.json) - see nodejs/node#33460

What is the new behavior?

I created a new package to handle the edge cases. This change uses my package to resolve dependencies or their package.json's.

@cla-bot cla-bot bot added the cla: yes label Sep 27, 2021
@rigor789
Copy link
Member Author

/cc @farfromrefug

@farfromrefug
Copy link
Contributor

@rigor789 i can confirm this fixes it for me! Thanks

@rigor789 rigor789 merged commit 56ed35b into master Sep 30, 2021
@rigor789 rigor789 deleted the fix/require-resolve-with-exports branch September 30, 2021 17:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants