0

1. for example when i run "expo start" it shows the following message:

'expo' n’est pas reconnu en tant que commande interne ou externe, un programme exécutable ou un fichier de commandes

2. My system variables are set to the following:

  • Path: C:\Windows\system32; C:\Windows ; C:\Windows\System32\Wbem ; C:/Users/Microk/AppData/Roaming/npm; C:\Programmes\Nodejs; C:\Programmes\Git;
  • pathtext:.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC
  • windir: C:\Windows

3. My user variables are set to the following:

  • Path:c:\windows\system32; c:\windows ; c:\windows\system32\wbem; c:/Users/Microk/AppData/Roaming/npm; C:\Programmes\nodejs; C:\Programmes\Git;
  • pathtext:.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC
  • windir: C:\Windows
  • 1
    Does `find /?` work? If yes, it just can't find `expo` - that's very different from `any command except built-in` – Stephan Jun 08 '20 at 11:33
  • 1
    You should not have the same locations set under PATH for both the User and System environments. Based upon what you've posted, and assuming you're not running an ancient OS, I'd expect to see certainly the location of `powershell`, and not the location for `npm` under System. I'd expect to see `C:/Users/Microk/AppData/Roaming/npm` under User instead, and none of the others shown. _I'm also assuming that the leading and/or trailing spaces are not really there too._ Also, have you seen [this existing question](https://stackoverflow.com/q/52731872) and answers? – Compo Jun 08 '20 at 11:36
  • 1
    Also, are you sure that `expo` is not really `C:\Users\Microk\AppData\Roaming\npm\node_modules\expo-cli\bin\expo.js`? which means you should add `C:\Users\Microk\AppData\Roaming\npm\node_modules\expo-cli\bin` to your User environment PATH variable list. _Please note, that this is a Windows Operating System, so the default path separator is a back slash, not a forward slash._ – Compo Jun 08 '20 at 11:50
  • @Stephan yes it works. what should i do in this case – Ferhane Riyadh Jun 08 '20 at 13:15
  • 1
    as Compo suggested: either add the path to `%PATH%` or (preferably) use the Full Qualified File Name ('":\full path to\expo.js"`) – Stephan Jun 08 '20 at 13:18
  • 1
    Also, there are typically no SPACE characters before and after a directory in the PATH variable. – lit Jun 08 '20 at 14:26
  • after following @Compo instructions, and running "expo start" now it shows the following message: '"node"' is not reconized as internal or external command ...etc. hope u can help me. thank you all – Ferhane Riyadh Jun 08 '20 at 16:08
  • 1
    You also need to have the location of `node.js` in your `%PATH%`, _(probably `C:\Program Files\Nodejs`)_, or use the absolute path to it! e.g. `C:\Program Files\Nodejs\node.js`. – Compo Jun 08 '20 at 16:29
  • thank u all guys. it worked after following ur instructions <3 – Ferhane Riyadh Jun 09 '20 at 07:17

1 Answers1

0

the solution was to set my enviroment variables to the following:

1. user variables:

  • path:C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\system32\WindowsPowerShell\v1.0\Modules;C:\Programmes\Nodejs\node.js;C:\Programmes\Git;C:\Windows\System32;C:Wwindows;C:\Windows\System32\wbem;C:\Users\Microk\AppData\Roaming\npm;C:\Users\Microk\AppData\Roaming\npm\node_modules\expo-cli\bin;C:\Programmes\Git;C:\Program Files\nodejs
  • PATHEXT: %PATHEXT%;.RB;.RBW
  • node:C:\Programmes\nodejs\node.js
  • NODE_PATH:C:\Users\Microk\AppData\Roaming\npm\node_modules

2. System variables:

  • Path:C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\system32\WindowsPowerShell\v1.0\Modules;C:\Programmes\Nodejs\node.js;C:\Programmes\Git;