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

Add a symlink for "stable" to point to the right version #851

Closed
wldcordeiro opened this issue Sep 25, 2015 · 2 comments
Closed

Add a symlink for "stable" to point to the right version #851

wldcordeiro opened this issue Sep 25, 2015 · 2 comments
Labels
feature requests I want a new feature in nvm!

Comments

@wldcordeiro
Copy link

Currently I'm using nvm to manage my installed node versions and I use the stable release. One of my use cases is that I use linters that Sublime Text looks for, each time the stable release updates (say from 4.1.0 to 4.1.1) there's a new version folder and I have to update the path Sublime Text looks at for the linter, if there were a symlink for stable I could just point to it like this

paths": {
            "linux": [
                "~/npm/bin/",
                "/usr/local/bin/",
                "/home/wldcordeiro/.nvm/versions/node/stable/bin/"
            ],
@ljharb ljharb added the feature requests I want a new feature in nvm! label Sep 25, 2015
@ljharb
Copy link
Member

ljharb commented Sep 25, 2015

So, first, "stable" is not a concept that exists anymore. All versions of things that follow semver are stable, so io.js, and node 4.0 and later, are always "stable".

As to your primary request: this has been tried before - however, nvm requires a shell environment. It's simply not appropriate to use it in an editor/IDE. See #734, #499, #355, #89.

I understand manually updating npm bin -g in your editor is annoying, but since nvm is not for using a system-wide version of node, there's not a great solution here, unless you can get Sublime to actually source nvm, nvm use node, and then use the resulting npm bin -g or PATH.

@ghuser
Copy link

ghuser commented Nov 26, 2019

Wouldn't supporting hooks be possible solution to this issue?

Then someone could decide whether to add a command (e.g on the nvn-use hook) like this:

ln -sf $(dirname $(npm bin -g)) /opt/node

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature requests I want a new feature in nvm!
Projects
None yet
Development

No branches or pull requests

3 participants