-
-
Notifications
You must be signed in to change notification settings - Fork 6
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
Does not work with package exports #9
Comments
See: nodejs/node#42219 There's unfortunately no reliable way to do this at the moment. |
Interesting, thank you! |
Keeping this open for discoverability. |
This seems to also break some functionality with commit hooks in lerna. Not sure if and where it can be fixed but just linked the issues for visibility. |
This was referenced May 2, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Given a package that has
exports
in itspackage.json
, like this:When trying to resolve that package, a
MODULE_NOT_FOUND
error is thrown with"Cannot find module '/path/to/my-package/dist/package.json.js'"
Basically the assumption here that you can always resolve the
package.json
of a package using node does not hold true anymore in this case. Still I'd like to be able to get the root path of that package, using node module resolution rules. 🤔The text was updated successfully, but these errors were encountered: