Unexpected token: punc ())
Description
Getting below error on trying to build JS bundle using below command
$ react-native bundle --reset-cache --minify --entry-file='index.js' --bundle-output='./ios/main.jsbundle' --sourcemap-output='ios/build/main.jsbundle.map' --assets-dest='./ios/' --dev=false --platform='ios'
Error:
node_modules/@shopify/react-native-skia/src/skia/web/JsiSkShader.ts: Unexpected token: punc ()) in file node_modules/@shopify/react-native-skia/src/skia/web/JsiSkShader.ts at 26:40.
This issue is happening when I tried to update Skia to the latest version "@shopify/react-native-skia": "1.10.2"
I am using "react-native": "0.73.3"
React Native Skia Version
1.10.2
React Native Version
0.73.3
Using New Architecture
- [x] Enabled
Steps to Reproduce
- Update Skia version to 1.10.2
- Execute
$ react-native bundle --reset-cache --minify --entry-file='index.js' --bundle-output='./ios/main.jsbundle' --sourcemap-output='ios/build/main.jsbundle.map' --assets-dest='./ios/' --dev=false --platform='ios'
Snack, Code Example, Screenshot, or Link to Repository
error node_modules/@shopify/react-native-skia/src/skia/web/JsiSkShader.ts: Unexpected token: punc ()) in file node_modules/@shopify/react-native-skia/src/skia/web/JsiSkShader.ts at 26:40. Error: Unexpected token: punc ()) in file node_modules/@shopify/react-native-skia/src/skia/web/JsiSkShader.ts at 26:40 at minifyCode (/Users/mmunaf/Development/Projects/sugarfit/sugarfit-mobile/node_modules/metro-transform-worker/src/index.js:74:13) at process.processTicksAndRejections (node:internal/process/task_queues:95:5) at async transformJS (/Users/mmunaf/Development/Projects/sugarfit/sugarfit-mobile/node_modules/metro-transform-worker/src/index.js:241:22) at async transformJSWithBabel (/Users/mmunaf/Development/Projects/sugarfit/sugarfit-mobile/node_modules/metro-transform-worker/src/index.js:299:10) at async Object.transform (/Users/mmunaf/Development/Projects/sugarfit/sugarfit-mobile/node_modules/metro-transform-worker/src/index.js:413:12) info Run CLI with --verbose flag for more details. error Command failed with exit code 1.