'expo' is not recognized as an internal or external command

后端 未结 15 956
余生分开走
余生分开走 2020-12-30 01:12

After running npm install -g expo-cli and successfully installing the packages globally, expo is still not recognized as an internal or external co

相关标签:
15条回答
  • 2020-12-30 01:47

    go to the environment variable, then in the user variable section find Path and press the edit button, you will see a new window, press new and add the following

    %USERPROFILE%\AppData\Roaming\npm
    

    then press ok. Now,

    expo --version
    
    0 讨论(0)
  • 2020-12-30 01:49

    Added These path of npm like this i have the same issue i fix it by adding the path to environment system

    C:\Users\abobakr\AppData\Roaming\npm
    

    After that close CMD and open it again it should work believe me

    0 讨论(0)
  • 2020-12-30 01:51

    If it still doesnt work or you can't access npm. Try setting the path with the Windows PowerShell:

    1. Open Windows Powershell as Administrator
    2. Type: setx path "%path%;C:\Users\USERNAME\AppData\Roaming\npm"

    It worked for me.

    0 讨论(0)
提交回复
热议问题