volta icon indicating copy to clipboard operation
volta copied to clipboard

Volta fails to execute node in Cursor IDE terminal on Ubuntu 24

Open yaneek opened this issue 9 months ago • 10 comments

When executing Volta inside Cursor IDE integrated terminal I got an error:

> node -v
Volta error: Could not find executable "cursor.AppImage"

Use `volta install` to add a package to your toolchain (see `volta help install` for more info).
Error details written to /home/xxx/.volta/log/volta-error-2025-04-04_11_05_32.088.log

> cat /home/xxx/.volta/log/volta-error-2025-04-04_11_10_50.850.log
"/home/xxx/Applications/cursor.AppImage" "-v"
Volta v2.0.2

Could not find executable "cursor.AppImage"

Use `volta install` to add a package to your toolchain (see `volta help install` for more info).

Error cause: No such file or directory (os error 2)

> volta -v
2.0.2

> env | grep -E "volta|VOLTA"
PATH=....:/home/xxx/.volta/bin:....
VOLTA_HOME=/home/xxx/.volta

> which node
/home/xxx/.volta/bin/node

> ls -l /home/xxx/.volta/bin/node
lrwxrwxrwx 1 xxx xxx 34 kwi  4 11:08 /home/xxx/.volta/bin/node -> /home/xxx/.volta/bin/volta-shim

> ls -al /home/xxx/.volta/bin/volta-shim
-rwxr-xr-x 1 xxx xxx 10637848 gru  5 07:44 /home/xxx/.volta/bin/volta-shim

And when using linux terminal, in the same folder works fine:

> node -v
v16.20.1

> volta list all
⚡ User toolchain:

    Node runtimes:
        v14.20.1
        v16.20.1 (current @ /home/xxx/project/package.json)
        v18.20.4
        v20.17.0
        v20.18.3 (default)

    Package managers:
        Yarn:
            v1.22.22 (current @ /home/xxx/project/package.json)
            v4.1.0

I am using Ubuntu 24.04 (noble).

Any idea, workaround to use with Cursor IDE?

yaneek avatar Apr 04 '25 09:04 yaneek

I'm noticing this as well. Seems to have changed recently, probably between https://github.com/NixOS/nixpkgs/commit/46e634be05ce and https://github.com/NixOS/nixpkgs/commit/9807714d6944.

(My DNS resolution takes longer when the dynamic IP assigned to me by Verizon changes, until I apply a manual update via nixops. Today's IP change ran into this, but the last one (on May 22) didn't.)

jerith666 avatar Jul 16 '25 18:07 jerith666

I have a fresh arch linux install, i was trying to install nix as usual but i get

warning: error: unable to download 'https://nixos.org/channels/nixpkgs-unstable': Timeout was reached (28) Resolving timed out after 5001 milliseconds; retrying in 264 ms

when i do nix-channel --update

is this related?

i am also having the same time out problem when i try to ping nixos.org (ipv4 and ipv6)

rnoba avatar Jul 18 '25 20:07 rnoba

Getting the same issue when I tried to run nixos-rebuild, which I only got after upgrading my nixpkgs flake input when dealing bcachefs issue with Linux 6.16.

RadxaYuntian avatar Jul 29 '25 03:07 RadxaYuntian

I'm noticing this as well. Seems to have changed recently, probably between NixOS/nixpkgs@46e634be05ce and NixOS/nixpkgs@9807714d6944.

At least NixOS/nixpkgs@3a69ec5f156ead261e57a377fb03e105e9a6fe0c on nixos-25.05 branch is still good.

RadxaYuntian avatar Jul 29 '25 09:07 RadxaYuntian

Ran into this issue with Ubuntu under WSL2. Setting the connect-timeout = 60000 in /etc/nix/nix.conf resolved the issue for me.

xfthhxk avatar Aug 01 '25 17:08 xfthhxk

Might be the same thing as #13466

dramforever avatar Sep 14 '25 11:09 dramforever

Seemingly the OP has tried increasing connect-timeout, so something else may be going on

lzcunt avatar Sep 15 '25 10:09 lzcunt

This means that the timeout was still 5 seconds on the daemon side, which ~/.config/nix/nix.conf doesn't affect.

Timeout was reached (28) Resolving timed out after 5000 milliseconds

I don't know if this part is intended but see https://github.com/NixOS/nix/issues/13466#issuecomment-3288919951 for a temporary fix for the daemon on NixOS

On non-NixOS just edit /etc/nix/nix.conf and restart daemon

dramforever avatar Sep 15 '25 11:09 dramforever

Please test 2.31.2. You can use the workaround here while updating: https://github.com/NixOS/nix/issues/13466#issuecomment-3288919951. Both may be required, since some network operations happen on CLI side and some on daemon side.

If you see this and the value is close to 5000, the config hasn't been set correctly.

Resolving timed out after 5001 milliseconds

dramforever avatar Sep 23 '25 15:09 dramforever

Thanks for the help! I tried the workaround you mentioned, which worked well enough to upgrade to 2.31.2. I had a bit of trouble figuring out how to upgrade to 2.31.2 as that is not the latest stable version, but I eventually followed https://nix.dev/manual/nix/2.28/installation/upgrading.html replacing -p nix in nix-shell with -p nixVersions.latest and replacing --attr nix cacert with --attr nixVersions.latest cacert in the nix-env command. If anyone else is doing this in the future, remember to check the version of the nix package and the nixVersions.latest packages.

LinuxUser393 avatar Sep 23 '25 23:09 LinuxUser393