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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

node_version allows ^ while fnm it doesn't #900

Open
davesnx opened this issue Jan 3, 2023 · 3 comments
Open

node_version allows ^ while fnm it doesn't #900

davesnx opened this issue Jan 3, 2023 · 3 comments

Comments

@davesnx
Copy link

davesnx commented Jan 3, 2023

Hola @Schniz 馃憢馃徏

You already know that I love you and respect you, but here's a bug:

~ cat .node-version
^18.0.0

Results into

Can't find an installed Node version matching ^18.0.0.
Do you want to install it? answer [y/n]: y
error: The requested version is not installable: ^18.0.0
@Schniz
Copy link
Owner

Schniz commented Jan 3, 2023

I believe that can be fixed with #839 :sherthonk_holmes:

cc @amitdahan is it correct? :eyebrow-man:

@Schniz
Copy link
Owner

Schniz commented Jan 4, 2023

just discussed with @amitdahan

looks like it resolves ^18.0.0 as an alias. We have a bunch of options to have:

  • only allow aliases to be in the form of ^[A-Za-z_].*, I don't like it very much as it's a breaking change, but maybe this breaking change makes sense? :deep_thinking:
  • if fnm use considers the user input as an alias, it won't suggest to install this version as it will never be able to install it. (That's not entirely correct because if you have a custom nodejs distribution site then you can have named versions.. not sure if that's gonna work as I haven't tested it 馃槆 )

@davesnx
Copy link
Author

davesnx commented Jan 19, 2023

I'm unsure about the options you gave ^^

Why is considered an alias? or more precisely why an alias can't be resolved? I mean, I believe node-version allows @next lts.

Does it mean that we would need a crate with https://github.com/ehmicky/node-version-alias If we want to support it correctly?

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