-
Notifications
You must be signed in to change notification settings - Fork 612
Closed
Description
The setup for Git Bash (Windows) cannot run cli tools that are installed using npm install -g.
$ fnm env
export PATH="C:\\Users\\XXX\\AppData\\Local\\Temp\\fnm_multishell_15584_1612875966568":$PATH
export FNM_MULTISHELL_PATH="C:\\Users\\XXX\\AppData\\Local\\Temp\\fnm_multishell_15584_1612875966568"
...
Running node works:
node -v
v15.8.0
But bash is somehow confused about the actual path:
$ which node
/c/Users/XXX/Work/neo-backend/\Users\XXX\AppData\Local\Temp\fnm_multishell_17812_1612875949353/node
And if I use any cli tool installed with npm, I'll get this:
$ npm install -g yarn
added 1 package
$ yarn
node:internal/modules/cjs/loader:928
throw err;
^
Error: Cannot find module 'C:\Program Files\Git\Users\XXX\AppData\Local\Temp\fnm_multishell_17812_1612875949353\node_modules\yarn\bin\yarn.js'
This can be fixed by making sure that the PATH env variable is using Git-Bash paths:
export PATH="/c/Users/XXX/AppData/Local/Temp/fnm_multishell_15584_1612875966568":$PATH
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels