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

Allow using the system version of node #6

Closed
yardnsm opened this issue Jan 24, 2019 · 9 comments · Fixed by #97
Closed

Allow using the system version of node #6

yardnsm opened this issue Jan 24, 2019 · 9 comments · Fixed by #97
Labels
enhancement New feature or request

Comments

@yardnsm
Copy link

yardnsm commented Jan 24, 2019

nvm allows to use the system version of node and npm (if installed). Having this feature in fnm will be awesome.

$ fnm use system

Also, maybe $ fnm ls should also list the system version.

@Schniz
Copy link
Owner

Schniz commented Jan 24, 2019

Interesting!

@Schniz Schniz mentioned this issue Feb 12, 2019
@Schniz Schniz added the enhancement New feature or request label Feb 14, 2019
@Schniz
Copy link
Owner

Schniz commented Mar 27, 2019

@wildcard is also interested in this and he might implement this! I suggested the following path:

  • Make a fake alias, called system, that will be linked to /dev/null.
  • When the current version will use the system alias, it will be linked to /dev/null, with no surprises.
  • There is no node on /dev/null, therefore it will fallback to the rest of the $PATH.
  • The rest of the $PATH should have node installed, otherwise, node wouldn't work! and I think this is the right way - using system means fnm doesn't manipulate $PATH, you're on your own.

This should be very performant and should just use the operating system "primitives"!

Oh, yeah.

@friederbluemle
Copy link

I can do fnm use system, but when I do fnm default system I get this error:

Can't find a version installed in /Users/<name>/.fnm/node-versions/system/installation

Any ideas?

@thomsj
Copy link
Contributor

thomsj commented Oct 21, 2019

@friederbluemle I believe that it is not (currently) possible to alias the system version.

@friederbluemle
Copy link

Thanks for the reply @thomsj - It would be great to have this as an option. I very rarely require a Node version other than the default stable release shipped by OS package managers. So in almost all cases, I would simply use system as a default.

@ljharb
Copy link

ljharb commented Oct 22, 2019

Note that every node release is stable; OS package managers are disastrously conservative on that front.

@friederbluemle
Copy link

@ljharb - Sorry, by stable I just meant whatever was shipping with the OS packager. At least pacman (on Arch Linux) and brew (on macOS) are usually only a few days behind each release (as it appears on nodejs.org). I'm not sure about other package managers. Fortunately the 0.x days (where almost every release was a breaking release) are over.

@broven
Copy link

broven commented Oct 13, 2021

any update on this? fnm default system still got error

@selrond
Copy link

selrond commented Oct 25, 2021

Seems to already be implemented in #556 just not released yet

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

Successfully merging a pull request may close this issue.

7 participants