react-native-skia icon indicating copy to clipboard operation
react-native-skia copied to clipboard

Unexpected token: punc ())

Open mohdmunaf opened this issue 1 year ago • 0 comments

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

  1. Update Skia version to 1.10.2
  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.

mohdmunaf avatar Jan 22 '25 06:01 mohdmunaf