version-fox / version-fox/vfox
[BUG]: Unable to run "npm" after "vfox use nodejs" in Git Bash
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 4k
- Forks
- 157
- Avg merge
- 1h 3m
- Merged PRs (30d)
- 5
Description
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 nodejs@20.13.1.
$ 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
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the reported vfox 0.5.3 commands in Git Bash on Windows 11, then inspect the generated Node.js directory and the npm and npm.cmd entries. The work is done when npm --version runs successfully after vfox use nodejs, without requiring npm.cmd.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- bash, node.js
- Domain
- cli, developer-experience
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 30/100