You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the beginning I want to say that I love your module and thank you for that!
The problem:
In case of nvm, node resolve function will resolve node's root node_modules if they're located not on top of the tree.
I've investigated your source code - it's just going up through parent dirs and checks for file existence, but nvm's global modules are located at $HOME/.nvm/versions/node/{version}/lib/node_modules.
So global modules or links are not found all the times.
Possible solutions:
Add an option to set additional search path (as require.resolve does)
Support node's root directory somehow (it's returned by npm root -g, so maybe there's a way to get it programmically).
Thank you:)
The text was updated successfully, but these errors were encountered:
In the beginning I want to say that I love your module and thank you for that!
The problem:
In case of nvm, node
resolve
function will resolve node's rootnode_modules
if they're located not on top of the tree.I've investigated your source code - it's just going up through parent dirs and checks for file existence, but nvm's global modules are located at
$HOME/.nvm/versions/node/{version}/lib/node_modules
.So global modules or links are not found all the times.
Possible solutions:
npm root -g
, so maybe there's a way to get it programmically).Thank you:)
The text was updated successfully, but these errors were encountered: