react-native

react native bundle sha-1 for file not computed(unable to load script from assets index.android.bundle)


I'm using react-native getting started tutorial for creating new rn app.after installations when I try to run my just created app I'm getting this error:

unable to load script from assets index.android.bundle

after lot's of research about this lead me to do bundle but when I do bundle with this command

react-native bundle --platform android --dev false --entry-file index.android.js --bundle-output android/app/src/main/assets/index.android.bundle --assets-dest android/app/src/main/res

I'm getting this error:

SHA-1 for file c:\Users\mehrdad\Desktop\WorkSpace\ReactNative\awesomeproject\index.js is not computed

And my problem still exists

"react": "16.4.1",

"react-native": "0.56.0",

"windows 8.1"

Solution

  • The React Native documentation says to remove react-native-cli globally.
    Therefore the following solution is outdated.


    I updated react-native-cli and the problem disappeared :

    npm i -g react-native-cli