expo npm enviroment variable path

     $ expo --version
      bash: expo: command not found

      Amoory@S MINGW64 ~/rn
       $ expo
        bash: expo: command not found

I am not sure how WSL and Windows interact in terms of the Windows %PATH% and the bash $PATH etc.

What does this give you?

$ echo $PATH

Does node run if you open cmd.exe and just type node?

Do you have node.exe at C:\Users\Amoory\.npm-global\npm\bin\node.exe? If not, where is it?

The following might show you at what path bash can find node.exe:

$ find / -type f \( -name 'node' -o -name 'node.exe' \)

If the above prints something like /c/node/bin/node.exe (for example) then try running node from bash by specifying that full path. If that works, then add c/node/bin to your Windows and/or bash PATH.

echo path give me :

$ echo $PATH
/c/Users/Amoory/bin:/mingw64/bin:/usr/local/bin:/usr/bin:/bin:/mingw64/bin:/usr/bin
:/c/Users/Amoory/bin:/c/Program Files/nodejs
:/c/Users/Amoory/AppData/Local/Microsoft/WindowsApps
:/c/Users/Amoory/AppData/Local/GitHubDesktop/bin
:/c/Users/Amoory/AppData/Local/Yarn/bin
:/c/Users/Amoory/AppData/Local/Programs/Microsoft VS Code/bin
:/c/Users/Amoory/AppData/Roaming/npm:/c/Users/Amoory/.npm-global:/usr/bin/vendor_perl:/usr/bin/core_perl

the Node.exe at C:\Program Files\node.exe
the problem i have is when i download exp -cli global i can’t use it bcz the bash doesn’t recognize it the environment variable env or download directory is wrong.
how I should make windows find the expo cli when I use it in any place like desktop or user file ?

How did it end up at C:\Program Files\node.exe? Are you sure it’s not C:\Program Files\nodejs\bin\node.exe?

If it is really at C:\Program Files\node.exe then add C:\Program Files to your Windows PATH and by the looks of things bash will pick it up (but you will probably have to close the bash window and open it again.
If it is really at C:\Program Files\nodejs\bin\node.exe then add C:\Program Files\nodejs\bin to your Windows PATH.

1 Like

no it’s end like this : C:\Program Files\nodejs\node.exe

what did you mean about " add C:\Program Files to your Windows PATH " ? and how?



Amoory@S MINGW64 ~/Desktop
$  type -a expo
expo is /c/Users/Amoory/.npm-global/expo

Amoory@S MINGW64 ~/Desktop
$ expo --version
3.9.1

i try with cmd terminal and its working fine :star_struck:

1 Like