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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Module not found: Default condition should be last one #486

Closed
micheledilernia-kanpla opened this issue Aug 8, 2022 · 4 comments
Closed

Comments

@micheledilernia-kanpla
Copy link

Hi馃榿
I'm having some troubles building my Next.js project. The terminal keeps throwing this error: Module not found: Default condition should be the last one.

Screenshot 2022-08-08 at 13 59 03

Searching around I found this link that explains why it happens: Module not found: Default condition should be the last one.
Basically, the error tells that the default entry should be the last entry in the package.json. And concurrently with the rule enhanced-resolve of webpack the error is thrown.

Would it be possible to move the default entry to the last position?
Like so:

  • from:

Screenshot 2022-08-08 at 14 05 47

  • to:

Screenshot 2022-08-08 at 14 06 01

@saibotsivad
Copy link
Contributor

Sure enough, from the NodeJS docs it says:

"default" [...] This condition should always come last.

I broke that with #484 sorry about that! 馃う

Give me a few minutes and I'll make a PR to re-order them.

@saibotsivad
Copy link
Contributor

Sorry about that @angus-c there's a fix in #488 for you.

saibotsivad added a commit to saibotsivad/just that referenced this issue Aug 8, 2022
@angus-c angus-c closed this as completed in 386d87d Aug 8, 2022
@angus-c angus-c reopened this Aug 8, 2022
@angus-c
Copy link
Owner

angus-c commented Aug 8, 2022

Thanks for reporting this @micheledilernia-kanpla!
I've applied @saibotsivad's fix and published a patch version for every package.
Let us know if this is still an issue after you upgrade to the patch(es)

@angus-c angus-c closed this as completed Aug 8, 2022
@micheledilernia-kanpla
Copy link
Author

Thanks for reporting this @micheledilernia-kanpla! I've applied @saibotsivad's fix and published a patch version for every package. Let us know if this is still an issue after you upgrade to the patch(es)

@angus-c and @saibotsivad It's working fine! Thanks馃榿

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

No branches or pull requests

3 participants