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

How to install local version specified in .npm-version? #245

Open
ChocolateLoverRaj opened this issue Jan 9, 2022 · 4 comments
Open

How to install local version specified in .npm-version? #245

ChocolateLoverRaj opened this issue Jan 9, 2022 · 4 comments

Comments

@ChocolateLoverRaj
Copy link

I downloaded this repo which has a .node-version file, which said 10.20.0. How do I tell nodist to install the version specified in the .node-version file? I did nodist --help but it didn't show any commands to do that. I ended up doing nodist local 10.20.0. This isn't very convenient because I have to open the file myself and type that version into the nodist command.

@robrich
Copy link
Collaborator

robrich commented Jan 10, 2022

nodist + 10.20.0

Or you can try removing the .node-version file and see if the dependencies work with a supported version of Node. What I've generally found is I must say npm install --legacy-peer-deps to get past incompatible dependencies, then often it works just fine. If this doesn't work, no harm done, delete node_modules and package-lock.json, restore .node-version and use the specified version.

@ChocolateLoverRaj
Copy link
Author

So I guess what I'm requesting is a command that reads from the existing .node-version and installs it.

@Atry
Copy link

Atry commented Jan 28, 2023

In PowerShell, just print .node-versions and append it to nodist add would work.

nodist add @(Get-Content .\.node-version); nodist npm match

@ChocolateLoverRaj
Copy link
Author

Ok I will read the file and input it to nodist add. Basically I made this issue to see if there was a command (or request a command) to do this as part of nodist. If it isn't going to be implemented, this issue can be closed.

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

3 participants