Open rares-lupascu opened 2 years ago
I also had such error
Execution failed for task ':app:bundleReleaseJsAndAssets'.
Process 'command 'node'' finished with non-zero exit value 1
on creating android APK with./gradlew assembleRelease
Then I tried to run
npx react-native bundle --platform android --dev false --entry-file index.js --bundle-output android/app/src/main/assets/index.android.bundle --assets-dest android/app/src/main/res/
and it showed me more detailed error
error shim.js: /coinweb-app/shim.js: Property left of AssignmentExpression expected node to be of a type ["LVal"] but instead got "StringLiteral".
And in the end I was able to fix it like this
const isDev = typeof __DEV__ === "boolean" && __DEV__;
Object.assign(process.env, { NODE_ENV: isDev ? "development" : "production" });
So I agree there is a problem with
process.env['NODE_ENV'] = isDev ? 'development' : 'production';
@DDushkin Thank you man!!! You saved my day
i do not know if i am the only one having this issue but ... this line in shim.js
has to changed into this
to fix this error on iOS
if anyone has another fix for this i would love to hear about it :)
thanks