Skip to content
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

Move exports.key.default to last position #1828

Merged
merged 1 commit into from
Apr 21, 2024
Merged

Move exports.key.default to last position #1828

merged 1 commit into from
Apr 21, 2024

Conversation

karlhorky
Copy link

Addresses #1613 (comment)


Comment content copied here:

Ah, seems like this 'react-player/file' import fails with a Default condition should be last one error message on compile time (Next.js) though 😬

Module not found: Default condition should be last one
  5 | // eslint-disable-next-line import/no-unresolved -- eslint-plugin-import doesn't understand `exports` in package.json yet https://github.com/import-js/eslint-plugin-import/issues/1810
> 6 | import ReactPlayer from 'react-player/file';
    | ^
  7 |
  8 | // ```
  9 |

https://nextjs.org/docs/messages/module-not-found

So maybe the "exports" config in package.json is misconfigured...

Eg. an example PR fixing such an error:

Copy link
Collaborator

@luwes luwes left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thank you, LGTM! lets try this

@luwes luwes merged commit 074c2ab into cookpete:canary Apr 21, 2024
5 of 6 checks passed
@karlhorky
Copy link
Author

Glad to help, thanks for the review and merge!

I see that this was published in react-player@3.0.0-canary.4, thanks!

I can confirm that this is working for our Next.js project 👍

@karlhorky karlhorky deleted the patch-1 branch April 21, 2024 13:35
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.

2 participants