Repository navigation
Open
Description
i do not know if i am the only one having this issue but ...
this line in shim.js
process.env['NODE_ENV'] = isDev ? 'development' : 'production';
has to changed into this
env = process.env ?? {};
env['NODE_ENV'] = isDev ? 'development' : 'production';
process.env = env;
to fix this error on iOS
error shim.js: /Users/wowzaaa/Projects/ideomaker/radixstream/shim.js: Property left of AssignmentExpression expected node to be of a type ["LVal"] but instead got "StringLiteral".
TypeError: /Users/wowzaaa/Projects/ideomaker/radixstream/shim.js: Property left of AssignmentExpression expected node to be of a type ["LVal"] but instead got "StringLiteral"
at Object.validate (/Users/wowzaaa/Projects/ideomaker/radixstream/node_modules/@babel/types/lib/definitions/utils.js:131:11)
at validateField (/Users/wowzaaa/Projects/ideomaker/radixstream/node_modules/@babel/types/lib/validators/validate.js:24:9)
at validate (/Users/wowzaaa/Projects/ideomaker/radixstream/node_modules/@babel/types/lib/validators/validate.js:17:3)
at NodePath._replaceWith (/Users/wowzaaa/Projects/ideomaker/radixstream/node_modules/@babel/traverse/lib/path/replacement.js:170:5)
at NodePath.replaceWith (/Users/wowzaaa/Projects/ideomaker/radixstream/node_modules/@babel/traverse/lib/path/replacement.js:152:8)
at PluginPass.MemberExpression (/Users/wowzaaa/Projects/ideomaker/radixstream/node_modules/react-native-dotenv/index.js:122:16)
at newFn (/Users/wowzaaa/Projects/ideomaker/radixstream/node_modules/@babel/traverse/lib/visitors.js:177:21)
at NodePath._call (/Users/wowzaaa/Projects/ideomaker/radixstream/node_modules/@babel/traverse/lib/path/context.js:53:20)
at NodePath.call (/Users/wowzaaa/Projects/ideomaker/radixstream/node_modules/@babel/traverse/lib/path/context.js:40:17)
info Run CLI with --verbose flag for more details.
Command PhaseScriptExecution failed with a nonzero exit code
if anyone has another fix for this i would love to hear about it :)
thanks
Metadata
Metadata
Assignees
Labels
No labels
Activity
DDushkin commentedon Jun 22, 2022
I also had such error
on creating android APK with
./gradlew assembleReleaseThen 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
And in the end I was able to fix it like this
So I agree there is a problem with
fifa-master commentedon Aug 23, 2023
@DDushkin Thank you man!!!
You saved my day