vfox icon indicating copy to clipboard operation
vfox copied to clipboard

[BUG]: Unable to run "npm" after "vfox use nodejs" in Git Bash

Open colececil opened this issue 1 year ago • 4 comments

Version vfox 0.5.3 (installed using scoop) OS Windows 11

Describe the bug After running vfox use nodejs in Git Bash, I can execute node, but I get a "No such file or directory" error if I try to execute npm. After looking inside the directory mentioned in the error message, I did find that if I instead run npm.cmd, it works.

Example

$ vfox use nodejs
Please select a version of nodejs:
  -> 20.13.1
Now using [email protected].
$ node --version
v20.13.1
$ npm --version
/bin/bash: C:/Users/colec/.version-fox/temp/1716613200-1047/nodejs/npm: No such file or directory
$ ls -al /c/Users/colec/.version-fox/temp/1716613200-1047/nodejs/
total 67896
drw-rw-rw-  3 colec 0     4096 2024-05-25 21:58 .
drw-rw-rw-  3 colec 0        0 2024-05-25 21:58 ..
-rw-rw-rw-  1 colec 0    55087 2024-05-25 21:58 CHANGELOG.md
-rw-rw-rw-  1 colec 0      334 2024-05-25 21:58 corepack
-rwxrwxrwx  1 colec 0      218 2024-05-25 21:58 corepack.cmd
-rwxrwxrwx  1 colec 0     3033 2024-05-25 21:58 install_tools.bat
-rw-rw-rw-  1 colec 0   119618 2024-05-25 21:58 LICENSE
-rwxrwxrwx  1 colec 0 69266072 2024-05-25 21:58 node.exe
drw-rw-rw-  4 colec 0        0 2024-05-25 21:58 node_modules
-rwxrwxrwx  1 colec 0      702 2024-05-25 21:58 nodevars.bat
-rw-rw-rw-  1 colec 0     2073 2024-05-25 21:58 npm
-rwxrwxrwx  1 colec 0      538 2024-05-25 21:58 npm.cmd
-rw-rw-rw-  1 colec 0     2073 2024-05-25 21:58 npx
-rwxrwxrwx  1 colec 0      538 2024-05-25 21:58 npx.cmd
-rw-rw-rw-  1 colec 0    39557 2024-05-25 21:58 README.md
$ npm.cmd --version
10.5.2

colececil avatar May 26 '24 03:05 colececil

I'm reporting the macos, msvc and premake errors reported by the CI to bmorel.

illwieckz avatar Jun 18 '24 02:06 illwieckz

The remaining error happening with premake on Linux doesn't seem to be introduced by this branch:

 ../../Source/main.cpp:62:16: error: unused function 'createDebug' [-Werror,-Wunused-function]
static Sample* createDebug() { return new Sample_Debug(); }
               ^
1 error generated.

illwieckz avatar Jun 18 '24 03:06 illwieckz

The remaining error happening with premake on Linux doesn't seem to be introduced by this branch:

 ../../Source/main.cpp:62:16: error: unused function 'createDebug' [-Werror,-Wunused-function]
static Sample* createDebug() { return new Sample_Debug(); }
               ^
1 error generated.

See this another PR for an attempt to fix that:

  • https://github.com/recastnavigation/recastnavigation/pull/720

illwieckz avatar Jun 20 '24 03:06 illwieckz