-
Notifications
You must be signed in to change notification settings - Fork 28.6k
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
doc: add info about using nvm #11141
Conversation
Adding information about a way of using nvm to use version of Node.js built from source.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please also add a note that once the real version of the prerelease you're installing is out, you'll want to explicitly uninstall this one, so that you can properly install it later.
Also, eventually I'll support this directly inside nvm
, so please keep an eye on my changelog so that these docs can be updated at that time :-)
BUILDING.md
Outdated
that nvm expects: | ||
|
||
```console | ||
$ make install DESTDIR='$(HOME)/.nvm/versions/node/' PREFIX='$(FULLVERSION)-pre' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
instead of hardcoding the versions path, it'd be ideal to use nvm_version_path "$VERSION"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll take a look at this. Also I've added a not about uninstalling. Thanks!
Is there a list of the version managers or something that we can link to? Note that EDIT: ah, I see, it's above |
BUILDING.md
Outdated
|
||
After this you can use `nvm` to switch between released versions and versions | ||
built from source. | ||
For example, if the version of Node.js is 8.0.0-pre: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
minor nit: perhaps prefix version number here with a 'v', as that is usually how node version numbers are displayed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point, I'll fix this. Thanks
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM pending #11141 (comment)
I don't know of any such lists, others might though.
I've added the information about |
Nice! Will do, I'm watching now and will try to track the progress on this. |
I was not able to use nvm_version_path as it is a function and I was not able to find a way to call it from within the Makefile (the command has to be passed in)
This seems related to nodejs/version-management#1 , and if we're going to cover windows as well it might be worth including something like nvs (not sure if nvs allows you to put files in arbitrary directories). |
As much as I love |
Should this maybe go into a wiki page instead of BUILDING.md? |
If it's going to be a user-facing guide, we should probably put it in nodejs/nodejs.org rather than in doc/guides, it's something that people should be able to find from the website as well. |
NVS supports this scenario (for both Windows and non-Windows platforms) via directory aliasing. |
It's worth pointing out that the website mentions apt, for example, presumably because people use it - since people use nvm, I'd expect it to be mentioned as well. I think if there's a need to mention all options or nothing, then the website and guides shouldn't have been mentioning anything except the official nodejs.org install methods for the last number of years. (ofc I think it's far more useful to add whatever might be helpful to users, and not be concerned with implicit endorsement) |
I'm -1 on including nvm in official docs at this point. As concluded in nodejs/TSC#96 (comment) and nodejs/version-management#11 (comment), the Node Foundation can't support nvm or any version or runtime manager unless we define and it meets some requirements, such as support on all platforms, how it manages PATH, and others under discussion at https://github.com/nodejs/version-management/issues. @danbev while these instructions may work at the moment, by including them here we'll have to keep them updated, and perhaps add instructions for other version managers and platforms, which is a burden on core for an unsupported tool. On the other hand, a guide in nodejs.org targeted at users and listing all known version managers with caveats and instructions for each seems reasonable, or maybe an independent blog post or gist. Even better, it would be great if someone wants to pick up the torch in the version-management repo, get consensus on the basic requirements, and update nvm to meet them. Then we could bring it in and support it! 😄 |
@joshgav Just to make sure – My first thought when I read the commit message was that this PR adds |
What concerns me is people filing bug reports when the steps in the official guide aren't working for them. I have nothing against nvm but I don't want to have to support it. Recommending it in less official documentation (like the wiki) is fine, however.
The "& co." is pretty much everyone that builds from source. That's a lot of people. |
Yes, I understand and agree that makes it more reasonable to include, but my objection is based on the reasons @bnoordhuis mentioned, that by including this in any docs here in nodejs/node we're implying to readers that it's supposed to work and core will fix it if it doesn't. |
@joshgav does https://nodejs.org/en/download/package-manager/ imply that node core will fix all of those package managers? If not, then nvm can be included now. If so, then that page should be taken down ASAP. I don't see any other logically consistent options. |
Good point 😄 . Still, I don't think we'd mention any of those in the official build doc unless they were truly necessary. |
My take would be the wiki would be a better place for this. |
I've got no opinion on the best place - but it'd be nice if it appeared at the same level of context as that package managers page. |
@ljharb I think it makes sense on the package manager page. It can be found at https://github.com/nodejs/nodejs.org/blob/master/locale/en/download/package-manager.md if someone wants to PR. Thanks! |
I was not sure where to put this and the BUILDING.md seemed like the right place. But reading the comments here it seems like the package-manager.md would be a better place for it. I'll open a PR against it instead. |
If the PR there is merged, this can be reopen to add a link to there I think? |
I've created nodejs/nodejs.org#1129 so anyone interested can follow it. I'll add a link to once it is merged |
Adding information about a way of using nvm to use version of Node.js
built from source.
Checklist
make -j4 test
(UNIX), orvcbuild test
(Windows) passesAffected core subsystem(s)
doc