-
Notifications
You must be signed in to change notification settings - Fork 413
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
[Question]: autoswitch for .npmrc? #370
Comments
Hi, and no worries. This is not supported right now. The real question is — how would you "switch" between different npm versions? What is your use-case? You want to install a Node version with a specific npm version? 😃 |
That's valid question and I do agree it's bit tricky to handle indeed. afaik some version mgr such as nvm for windows (https://github.com/coreybutler/nvm-windows) puts npm side-by-side to version of node.js installed, so it is possible switching node.js version actually changes npm as well. Primary usecase is let work repo enforces to use specific version automatically without manually changing. Supporting change node / npm at once would be best, but curious if it's possible to support switching node.js at least. This is a good-to-have feature in my mind, totally ok if this seems too complex to be included in fnm. |
npmrc doesn’t specify the version of anything. did you mean a different file? npm comes with node, so you’d switch it as part of switching the node version. an npm version manager would be an entirely different beast, and would conflict heavily with a node version manager. |
Huh, why I wrote npmrc - I meant nvmrc. |
I think I wrote my q too broad could cause overcomplex flows. What I was originally thinking is calling |
So if I understand you correctly, we do support So: |
Thanks for the quick update, I'll give it a go. When I write this q I guess I am dumb and missing some obvious and indeed it looks like it. 😅 |
All questions are good questions. I'm closing the issue but please open a new one or reopen if you have any issues. I'm here for any assistance! 😃 |
What would you fnm env --fnm-dir=$SSD/.fnm | source
fnm env --use-on-cd ? |
In what case? probably fnm env --fnm-dir=$SSD/.fnm --use-on-cd | source |
I'm not sure if I understand correctly. I have a file in Another thing that is strange to me is that when I run Assuming that the However, the feature of reverting the |
Sorry if this is already supported and I may miss obvious documentation.
Is there way to enable / config sort of automatic switching, i.e if change path and if those repos have corresponding
.npmrc
automatically callfnm use
? I'm trying to our work's setup to utilize fnm and curious if it's supported out of the box instead of trying to wrap those behaviors in our script.Also, thanks for the great work. 👍
The text was updated successfully, but these errors were encountered: