Giter Site home page Giter Site logo

Comments (7)

jorgebucaran avatar jorgebucaran commented on May 28, 2024 1

Well, I've never encountered this particular issue, but I suppose anything is possible. Maybe you stumbled upon some extremely rare edge case that only a select few have ever experienced. Or maybe it's just the limitations of Fish's subpar concurrency. I may circle back to this later, but I'll keep it closed for now.

from nvm.fish.

jorgebucaran avatar jorgebucaran commented on May 28, 2024

I see. But you still should be able to use multiple nodes at the same time in different terminals, since path changes are local, yes?

from nvm.fish.

GrantASL19 avatar GrantASL19 commented on May 28, 2024

I see. But you still should be able to use multiple nodes at the same time in different terminals, since path changes are local, yes?

Yes I can, but when this happens the terminal in which the failure happened will have the Homebrew node in the path until I re-run activate_directory_node_version:

awk: can't open file /Users/grant/.local/share/nvm/.index.temp
 source line number 6
nvm: Invalid version number or alias: "18.14.2"
Welcome to fish, the friendly interactive shell
Type `help` for instructions on how to use fish
~/c/a/s/web> node --version
v19.6.1
~/c/a/s/web> which node
/usr/local/bin/node
~/c/a/s/web> activate_directory_node_version
Now using Node v18.14.2 (npm 9.5.0) ~/.local/share/nvm/v18.14.2/bin/node
~/c/a/s/web> node --version
v18.14.2
~/c/a/s/web> which node
/Users/grant/.local/share/nvm/v18.14.2/bin/node

While the other terminal will (correctly) have the NVM node in the path from the beginning:

Now using Node v18.14.2 (npm 9.5.0) ~/.local/share/nvm/v18.14.2/bin/node
Welcome to fish, the friendly interactive shell
Type `help` for instructions on how to use fish
~/c/a/s/web> node --version
v18.14.2
~/c/a/s/web> which node
/Users/grant/.local/share/nvm/v18.14.2/bin/node

from nvm.fish.

jorgebucaran avatar jorgebucaran commented on May 28, 2024

To clarify, this only happens within VS Code?

from nvm.fish.

GrantASL19 avatar GrantASL19 commented on May 28, 2024

To clarify, this only happens within VS Code?

It happens in VS Code but it’s not a VS Code-specific bug.

I can also trigger this by opening two Terminal.app tabs to directories containing .node-version files, saving them with “Window -> Save Windows as Group…”, then opening that group with “Window -> Open Window Group” (might not happen every time, but happened for me in 2/3 attempts). So I think it’s safe to say this can happen in any context where nvm install is called simultaneously in two or more terminals.

from nvm.fish.

jorgebucaran avatar jorgebucaran commented on May 28, 2024

May I ask why you are trying to run the install command simultaneously in multiple terminals? Given that this is outside the scope of the project, I am going to close this issue (at least for now).

from nvm.fish.

GrantASL19 avatar GrantASL19 commented on May 28, 2024

May I ask why you are trying to run the install command simultaneously in multiple terminals? Given that this is outside the scope of the project, I am going to close this issue (at least for now).

I’ll often have two terminal tabs open in VS Code, and when I reopen the project they’re restored simultaneously.

I understand this is an unusual use case — for now I’ve been using fnm to solve this. Thanks for this project, it’s served me well for years!

from nvm.fish.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.