-
-
Notifications
You must be signed in to change notification settings - Fork 12
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
Discussion to improve reliability on Windows #21
Comments
This PR added the So depending on how you've installed |
I reopened this for discussion because after thinking about it, I think it would make more sense to take advantage of the logic we already have for checking the I think the most likely place to find the |
If in doubt, maybe it would be a good idea to compare with the results of |
I just tried to install older npm via nvm, then update it using
I'm now really unsure for the github docs on npm pointed out in #5 -> here... how does one install the global modules under the APPDATA? I can't seem to replicate this... (without explicit tampering of global env, of course). |
Any thoughts on what our best option is? I can try to implement a fix if we have consensus on what should be done. |
After reading through this again and considering the referenced docs have moved, it seems like using I think I've looked around to figure out if If you figure something out and want me to do some testing on windows, I have a laptop I can use. |
Agreed - I'd vote to revert the d8d1afb The other approach would be to use modules.paths[0], but I have a feeling like it wouldn't be "future-proof"... |
Perhaps we can just do |
not work with system link which nvm made to link the default node install path and the specific version node path. |
This line:
global-prefix/index.js
Line 57 in 49684bd
It would've give proper results without assuming the npm is under the APPDATA, i.e. if it's just:
prefix = path.dirname(process.execPath);
Is there any reason for assuming the npm runs under the
APPDATA
path?Currently, this gives back the wrong prefix on Windows with nvm (node v8.11.1; nvm 1.1.5)
The text was updated successfully, but these errors were encountered: