-
Notifications
You must be signed in to change notification settings - Fork 29.6k
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
doc: explain error message on missing main file #5812
Conversation
LGTM edit: added a nit regarding wrapping lines, if that is followed then LGTM stands |
@@ -346,6 +346,12 @@ If this was in a folder at `./some-library`, then | |||
|
|||
This is the extent of Node.js's awareness of package.json files. | |||
|
|||
Note: If the file specified by the `"main"` entry of `package.json` is missing and can not be resolved, node will report the entire module as missing with the default error: |
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.
can you wrap this at 80 characters. you will notice this is the longest line in the file
I realized it as well after I created the PR, I added another commit with properly wrapped lines. 😉 |
@drywolf would you be able to squash those into a single commit please. |
f806d26
to
85f9b40
Compare
@thealphanerd done. |
LGTM |
LGTM with a nit |
@@ -346,6 +346,14 @@ If this was in a folder at `./some-library`, then | |||
|
|||
This is the extent of Node.js's awareness of package.json files. | |||
|
|||
Note: If the file specified by the `"main"` entry of `package.json` is missing | |||
and can not be resolved, node will report the entire module as missing with |
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.
Small nit: s/node/Node.js/
Added a hint saying that node uses the default "Cannot find module" error when requiring a module for which the "main" file specified in the package.json is missing.
85f9b40
to
ba95e02
Compare
@jasnell fixed s/node/Node.js/ |
Added a hint saying that node uses the default "Cannot find module" error when requiring a module for which the "main" file specified in the package.json is missing. PR-URL: #5812 Reviewed-By: Myles Borins <[email protected]> Reviewed-By: Benjamin Gruenbaum <[email protected]> Reviewed-By: James M Snell <[email protected]>
Landed in f70c71f |
Added a hint saying that node uses the default "Cannot find module" error when requiring a module for which the "main" file specified in the package.json is missing. PR-URL: #5812 Reviewed-By: Myles Borins <[email protected]> Reviewed-By: Benjamin Gruenbaum <[email protected]> Reviewed-By: James M Snell <[email protected]>
Added a hint saying that node uses the default "Cannot find module" error when requiring a module for which the "main" file specified in the package.json is missing. PR-URL: #5812 Reviewed-By: Myles Borins <[email protected]> Reviewed-By: Benjamin Gruenbaum <[email protected]> Reviewed-By: James M Snell <[email protected]>
Added a hint saying that node uses the default "Cannot find module" error when requiring a module for which the "main" file specified in the package.json is missing. PR-URL: #5812 Reviewed-By: Myles Borins <[email protected]> Reviewed-By: Benjamin Gruenbaum <[email protected]> Reviewed-By: James M Snell <[email protected]>
Description of change
Added a hint to documentation saying that node uses the default "Cannot find module"
error when requiring a module for which the "main" file specified in
the package.json is missing.
for details see: #5758