Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unexpected token: punc ()) #2906

Open
1 task done
mohdmunaf opened this issue Jan 22, 2025 · 0 comments
Open
1 task done

Unexpected token: punc ()) #2906

mohdmunaf opened this issue Jan 22, 2025 · 0 comments
Labels
bug Something isn't working

Comments

@mohdmunaf
Copy link

mohdmunaf commented Jan 22, 2025

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

  • 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 mohdmunaf added the bug Something isn't working label Jan 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant