-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
serverBareModulesPlugin displays incorrect warnings for subpath imports in 1.6.2 #3604
Labels
bug
Something isn't working
Comments
Same issue for
|
Bug confirmed on 1.6.3, with the same message as @garth |
Merged
2 tasks
🤖 Hello there, We just published version Thanks! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
What version of Remix are you using?
1.6.2
Steps to Reproduce
The change introduced in #3085, where dependencies are tested with
require.resolve
, fails for modules that do not export a defaultmain
. For instance, my Remix app imports@noble/hashes/blake3
- the serverBareModulesPlugin will attempt torequire.resolve('@noble/hashes')
, which fails because@noble/hashes
does not have a main export (intentionally so).@noble/hahes/blake3
in a file (or any other module that requires importing from a subpath export and does not have a main export)Expected Behavior
I would expect that the detection logic is able to determine that
@noble/hashes
is included in mypackage.json
Actual Behavior
Currently it assumes that any failure of
require.resolve
implies that the module is not listed inpackage.json
(source) and displays the following warning:The text was updated successfully, but these errors were encountered: