-
Notifications
You must be signed in to change notification settings - Fork 144
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
Can't install latest version of npm globally #56
Comments
Hi, thanks for reporting. |
@tuvistavie no problem, happy to contribute, can you give me some pointers on where to start and briefly describe how the solution should work? i'm not familiar with the codebase ATM so that would be super helpful, thx for looking into this! |
@mareksuscak Thank you! However, after thinking about it, this is a little more complicated than it looks. |
|
I have this problem too. What if:
I'm using the work-around for now. But it will be easy to forget this, by the time I need to do it again. Thanks |
Running into this issue as well. MacOS High Sierra 10.13.1. FWIW I experienced this issue on Nodenv, first. I switched to ASDF (a good excuse to switch, anyway) to fix it, but the problem persisted. |
The workaround didn't work for me, nodejs 9.9.0 |
Perhaps it might make sense to automatically install This would likely work for anyone starting fresh (with the updated plugin). However, since shims are not recreated if they exist, it would require someone that has an older setup to manually fix it up (i.e. remove the previous shim). I suppose it would also break if someone uninstalled |
@andrewthauer that sounds totally reasonable, at least as a temporary fix |
I think the only way to avoid running into some of these outlier cases there must be a conditional check somewhere. In order to do this it's likely going to require some sort of plugin customization hook support in I think this might be a possible solution to the problem ... Provide an optional plugin hook that is used by the |
This works in tandom with a change in asdf core that will look for the exec-path command and use it appropriately when found to conditionally route the npm & npx commands to the correct executable path.
I ended up created a couple of PR's to address this #74 (which will work if accepted). I had a look at how A stock
|
It turns out the @tuvistavie, @Stratus3D, @HashNuke - I personally can't think of a strong reason to support There still would be the issue of pre-existing installs and shims that would likely cause breaking changes if it's removed completely. Given that the existing shims would be using the prefix, it seems like it could be difficult to address without breaking changes. |
I added a workaround that works for now (as of 2018-05-24): #57 (comment) This is not ideal, but it should at least make it work to get you out of possibly-insecure legacy npm versions. |
Fix Issue #56: Can't install latest version of npm globally
I'm unable to install and override the global
npm
package at all (i.e. replace with the latest version). I'm gettingFile name too long
error for many packages. This is a deal breaker for me.Global installs are also incredibly slow which was already reported here - #46
Other than that, it's a great idea to have a single version manager. Thanks for all the efforts.
PS: nodenv handles this well and global installs are fast - might be a great source of inspiration
OS: High Sierra w/ APFS
The text was updated successfully, but these errors were encountered: