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"
I updated react-native-cli
and the problem disappeared :
npm i -g react-native-cli
Ran into the same issue when using the react-native to run the mentioned command directly.
Running the same command with npx solved it for me. Try running the below and see if that helps.
npx 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
My issue was that I tried to require
a file with the proper path but incorrect capitalization.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With