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

Old version of nvm's Node.js in ~/.node_path #9

Open
alex7kom opened this issue Jul 6, 2020 · 1 comment
Open

Old version of nvm's Node.js in ~/.node_path #9

alex7kom opened this issue Jul 6, 2020 · 1 comment

Comments

@alex7kom
Copy link

alex7kom commented Jul 6, 2020

run-node caches the path with nvm version of Node.js that set as default when run-node first runs.
Right now run-node ignores a stale ~/.node_path only when node is not found, but there are other cases to consider:

  1. A new version of Node.js was installed and set as default via nvm. run-node will continue to run the old version because the path in .node_path is not updated.

  2. A new version of Node.js was installed and set as default via nvm, and the old version is deleted. run-node will not run the new version, and will run node found further in the path (like one installed via Homebrew).

@sindresorhus
Copy link
Owner

Happy to consider solutions. I personally neither use nvm nor find it very good. I would recommend https://github.com/tj/n instead. It has no such problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants