issue installing react native expo with npm install -g expo-cli

前端 未结 4 1766
忘了有多久
忘了有多久 2021-01-06 07:23

I was able to install and run react-native

but when I tried to install react native expo I got some errors

this is my Expo i

相关标签:
4条回答
  • 2021-01-06 07:47

    Today I tried to update my expo-cli and got the same error. So I installed an older version again. You can try this, it worked for me.

    npm i -g expo-cli@3.5.0
    

    EDIT: Now there is a bug report at Expo-CLI Github page & someone suggested to run npm install --global --production windows-build-tools and then install the latest version of Expo. This npm package installs Visual C++ Build Tools and Python 2.7. If you want the latest version of Expo, you can try this.

    0 讨论(0)
  • 2021-01-06 07:47

    Run the following command instead.

    yarn global add expo-cli
    
    0 讨论(0)
  • 2021-01-06 08:03

    Seems like there could be quite a few issues here and I don't think a simple answer would suffice..

    would need to know what environment that you are running your command from

    That being said, you could use advice from this GitHub issue thread and simple try and use npx

    npx expo init {my-project}
    

    https://github.com/expo/expo-cli/issues/590

    0 讨论(0)
  • 2021-01-06 08:06

    Same happened for me and in addition to uninstalling expo-cli through command line I had to manually uninstall the .expo folder under c/users and any expo and expo-cli related file under C:\Users\MyUser\AppData\Roaming\npm. Only then when installing the older version of expo (3.5.0) it started working again.

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