-
Notifications
You must be signed in to change notification settings - Fork 30.4k
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
Ill-formed exports field lacks clear error message when using ESM and self-resolve #31510
Comments
Thanks for the report! We should definitely aim for parity in these error messages. This sounds like the error message isn't specifically about self resolve but about
Yeah, unfortunately the docs are still lacking in terms of proper guides. The TL;DR of self resolve is: It should roughly work as if the package was installed as a dependency of itself, as long as the package is using |
No it seems to be related to self-resolve; I moved the test repository in a
|
Fix landed in 58de9b4. |
Let's take this
package.json
:When I try to use a self-resolve import, the error I get doesn't give any clue on why it has failed:
When using
require
, the error is quite clear on what the problem is and what solution to apply:Also, I find the documentation not very clear when it comes to
package.json
formatting; there are some information on the ES Modules page, and a (somewhat outdated) guide on the nodejs.org website, but other than that, I failed to find a clear explanation on how I can make self resolve work (other than the error message).CC @jkrems
The text was updated successfully, but these errors were encountered: