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

[readme] add examples of setting specific versions as default #3151

Merged
merged 1 commit into from
Aug 17, 2023
Merged

[readme] add examples of setting specific versions as default #3151

merged 1 commit into from
Aug 17, 2023

Conversation

Rockheung
Copy link
Contributor

In numerous blog posts regarding the configuration of the default nodejs version using nvm, the following command is often cited:

nvm alias default node

While this command might work in some cases (as node will point to the latest version installed on your system), it might not behave as intended if you want to default to a specific version of Node.js.

This command is actually referring to the Set default node version section in the nvm's README. It's crucial to note that the instructions suggest setting a specific node version of your choosing, rather than using the generic node.

So if you're aiming to set a particular version (for example, 14.15.1) as your default, the correct command would be:

nvm alias default 14.15.1

This ensures that the specified version of Node.js will be used by default. If you simply use node as in the first command, it could point to any installed version, which might not be what you intend.

Co-authored-by: heungjun.park <rockheung@gmail.com>
Co-authored-by: Jordan Harband <ljharb@gmail.com>
@Rockheung
Copy link
Contributor Author

This PR's base branch outdated, so closing

@Rockheung Rockheung closed this Jul 26, 2023
@ljharb
Copy link
Member

ljharb commented Jul 26, 2023

that's not a reason to close a PR; that's a reason to rebase it.

@ljharb ljharb reopened this Jul 26, 2023
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.

I tweaked your suggestion to be a bit more concise while hopefully being helpful.

@ljharb ljharb changed the title Little confusing about setting specific default node version [readme] add examples of setting specific versions as default Aug 17, 2023
@ljharb ljharb merged commit a1601ed into nvm-sh:master Aug 17, 2023
@capitalZAYE

This comment was marked as spam.

@Rockheung Rockheung deleted the chore/specific-node-version-example branch September 3, 2023 18:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants