torusresearch / react-native-web-browser

Web Browser module for React Native ported from expo-web-browser
MIT License
4 stars 3 forks source link

Build fails with Scheme = release #14

Open billyjacoby opened 1 year ago

billyjacoby commented 1 year ago

Getting this error after updating when trying to build for release mode:

error ../../node_modules/@toruslabs/torus-embed/dist/torus.cjs.js: Unexpected token name «_000», expected punc «,» in file ../../node_modules/@toruslabs/torus-embed/dist/torus.cjs.js at 129:23.
Error: Unexpected token name «_000», expected punc «,» in file ../../node_modules/@toruslabs/torus-embed/dist/torus.cjs.js at 129:23
    at minifyCode (/Users/billy/Programming-LOCAL/frontend/apps/react-native/node_modules/metro-transform-worker/src/index.js:99:13)
    at transformJS (/Users/billy/Programming-LOCAL/frontend/apps/react-native/node_modules/metro-transform-worker/src/index.js:320:28)
    at transformJSWithBabel (/Users/billy/Programming-LOCAL/frontend/apps/react-native/node_modules/metro-transform-worker/src/index.js:411:16)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
    at async Object.transform (/Users/billy/Programming-LOCAL/frontend/apps/react-native/node_modules/metro-transform-worker/src/index.js:572:12)
billyjacoby commented 1 year ago

It seems like it may be related to this issue: https://www.angularfix.com/2022/03/unexpected-token-name-expected-punc.html

In node_modules/@toruslabs/torus-embed/dist/torus.cjs.js changing maxOrderValue from 50_000 to 50000 on line 174 and 20_000 to 20000 on line 285 seems to fix it