-
Notifications
You must be signed in to change notification settings - Fork 29.9k
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
esm: better package.json parser errors #35117
Conversation
Review requested:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, assuming since modules is still experimental there is no concern about changing the error message.
IIUC, since this changes the |
Landed in 3fb7fcd |
PR-URL: nodejs#35117 Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Michael Dawson <[email protected]> Reviewed-By: Rich Trott <[email protected]>
PR-URL: #35117 Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Michael Dawson <[email protected]> Reviewed-By: Rich Trott <[email protected]>
PR-URL: nodejs#35117 Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Michael Dawson <[email protected]> Reviewed-By: Rich Trott <[email protected]>
PR-URL: #35117 Backport-PR-URL: #35385 Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Michael Dawson <[email protected]> Reviewed-By: Rich Trott <[email protected]>
PR-URL: nodejs#35117 Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Michael Dawson <[email protected]> Reviewed-By: Rich Trott <[email protected]>
This is a follow-up to #35072 to add more context to package.json parse errors.
Specifically the package / module being imported or imported from when the package.json parser error was encountered.
These kinds of cases make up for the fact that ESM, unlike require, does not have a require stack to see what was the import in the first case that caused the issue.
Checklist
make -j4 test
(UNIX), orvcbuild test
(Windows) passes