Skip to content
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

Closed
wants to merge 4 commits into from
Closed

Conversation

danbev
Copy link
Contributor

@danbev danbev commented Feb 3, 2017

Adding information about a way of using nvm to use version of Node.js
built from source.

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • documentation is changed or added
  • commit message follows commit guidelines
Affected core subsystem(s)

doc

Adding information about a way of using nvm to use version of Node.js
built from source.
@nodejs-github-bot nodejs-github-bot added the doc Issues and PRs related to the documentations. label Feb 3, 2017
Copy link
Member

@ljharb ljharb left a 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'
Copy link
Member

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"

Copy link
Contributor Author

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!

@joyeecheung
Copy link
Member

joyeecheung commented Feb 3, 2017

Is there a list of the version managers or something that we can link to? Note that nvm doesn't work on Windows.

EDIT: ah, I see, it's above ### Windows .

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:
Copy link
Contributor

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

Copy link
Contributor Author

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

Copy link
Member

@ljharb ljharb left a 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)

@danbev
Copy link
Contributor Author

danbev commented Feb 3, 2017

Is there a list of the version package managers or something that we can link to?

I don't know of any such lists, others might though.

Note that nvm doesn't work on Windows.

I've added the information about nvm under the Unix / OS X section for this reason.

@danbev
Copy link
Contributor Author

danbev commented Feb 3, 2017

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 :-)

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)
@gibfahn
Copy link
Member

gibfahn commented Feb 3, 2017

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).

cc/ @jasongin @joshgav

@jasnell
Copy link
Member

jasnell commented Feb 3, 2017

As much as I love nvm, I'm not sure we should do this without also documenting similar options for other platforms (like nvs for Windows). Perhaps this should go into a separate guide that covers several Version management options?

@evanlucas
Copy link
Contributor

Should this maybe go into a wiki page instead of BUILDING.md?

@gibfahn
Copy link
Member

gibfahn commented Feb 3, 2017

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.

@jasongin
Copy link
Member

jasongin commented Feb 3, 2017

not sure if nvs allows you to put files in arbitrary directories

NVS supports this scenario (for both Windows and non-Windows platforms) via directory aliasing.

@ljharb
Copy link
Member

ljharb commented Feb 3, 2017

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)

@joshgav
Copy link
Contributor

joshgav commented Feb 3, 2017

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! 😄

@addaleax
Copy link
Member

addaleax commented Feb 3, 2017

@joshgav Just to make sure – My first thought when I read the commit message was that this PR adds nvm to the API docs (and your comment reads like that’s what you thought too), but this is about our building documentation, targeted at collaborators & co.
I think we’re not really “picking a winner” here much more than our choice of eslint for linting does.

@bnoordhuis
Copy link
Member

and not be concerned with implicit endorsement

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.

but this is about our building documentation, targeted at collaborators & co.

The "& co." is pretty much everyone that builds from source. That's a lot of people.

@joshgav
Copy link
Contributor

joshgav commented Feb 3, 2017

@addaleax

this is about our building documentation, targeted at collaborators & co.

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.

@ljharb
Copy link
Member

ljharb commented Feb 3, 2017

@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.

@joshgav
Copy link
Contributor

joshgav commented Feb 3, 2017

@ljharb

does https://nodejs.org/en/download/package-manager/ imply that node core will fix all of those package managers?

Good point 😄 . Still, I don't think we'd mention any of those in the official build doc unless they were truly necessary.

@mhdawson
Copy link
Member

mhdawson commented Feb 3, 2017

My take would be the wiki would be a better place for this.

@ljharb
Copy link
Member

ljharb commented Feb 4, 2017

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.

@evanlucas
Copy link
Contributor

@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!

@danbev
Copy link
Contributor Author

danbev commented Feb 4, 2017

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.

@danbev danbev closed this Feb 4, 2017
@joyeecheung
Copy link
Member

If the PR there is merged, this can be reopen to add a link to there I think?

@danbev
Copy link
Contributor Author

danbev commented Feb 5, 2017

I've created nodejs/nodejs.org#1129 so anyone interested can follow it. I'll add a link to once it is merged

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
doc Issues and PRs related to the documentations.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet