-
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
require.resolve.paths truncated #28215
Comments
They're not truncated -- they're historical: https://nodejs.org/dist/latest-v10.x/docs/api/modules.html#modules_loading_from_the_global_folders Not sure why they are repeated though. |
@richardlau thank you for the link, did not see that before. Although, repetition aside, why does npm install the global packages right next to it, while node doesn't look it up? Is that to avoid global packages conflicting with actual dependencies? I was expecting to be able to import a global package, am I in the wrong? |
Apparently I am in the wrong: https://stackoverflow.com/a/15646750/7983255 Was following the instructions from |
This can be observed in the logs from the following error: #18230
I have the same behavior: Some paths that should end with
node_modules
end with justnode
. After looking at the parent folder, I can indeed see anode_module
folder, but notnode
.To me this looks like truncated paths, but not entirely sure.
Say in
/home/paul/.nvm/versions/node/v10.2.1/lib/
: there is only anode_modules
folder.For some reason some paths are also repeated, but the truncated paths concern me more.
An effect this issue has is that I can see the module I am looking for (
why-is-node-running
) inside/home/paul/.nvm/versions/node/v10.2.1/lib/node_modules
, but since node doesn't look in the right place, I cannot require it.The text was updated successfully, but these errors were encountered: