Replies: 1 comment 1 reply
-
I've converted this to a discussion because this seems like a misunderstanding of how npm and the module loader work, not a bug in node. The module loader is described in node's documentation, npm's docs you can find here: https://docs.npmjs.com/ |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Version
v18.9.0
Platform
Linux hostname-pc 5.19.2-zen1-1-zen #1 ZEN SMP PREEMPT_DYNAMIC Wed, 17 Aug 2022 14:28:00 +0000 x86_64 GNU/Linux
Subsystem
No response
What steps will reproduce the bug?
1: cd to directory another than $HOME
2: Just install module, do
npm link $module
in home folder, check, that folder is created or linked.3: try to run
require('module')
How often does it reproduce? Is there a required condition?
sometimes yes, sometimes not, (now ALWAYS)
What is the expected behavior?
That
require
will work, when ~/node_modules contains module with exact name and package.json with all the needed stuffWhat do you see instead?
}
Additional information
some modules worked, some not, but now nothing
Beta Was this translation helpful? Give feedback.
All reactions