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

オープン
#36 コメント 6 件 リアクション 1 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
3/5
見積もり時間
1〜2日
初心者へのやさしさ
50/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
nodejs, shell
領域
tooling

調査の方向性

The report names the install directory nodejs/ under the vfox temp path, where npm is a shell script and npm.cmd is a Windows batch shim. Reproduce on Windows in Git Bash with vfox use nodejs and compare which npm against npm.cmd, then find where the plugin's Lua hooks put that directory on PATH. Done when npm --version works in Git Bash after vfox use nodejs.

索引モデルが issue の本文から書いたものです。

説明

invalid

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
主要言語
Go
スター
10
フォーク
8
平均マージ
1時間 51分
マージ済み PR(30日)
12

環境構築

Codespaces で開く

このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。

  • Dockerfile・Docker Compose ファイルなし
  • プルリクエストのテンプレートなし
  • コントリビューションガイドなし

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

version-fox/vfox-nodejs のほかの issue

version-fox/vfox-nodejs の issue をすべて見る

似ている issue

Go の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。