Giter Site home page Giter Site logo

Compiling JS failed: 803620:268:')' expected at end of parenthesized expression Buffer size 35514497 starts with: 766172205f5f42554e444c455f535441 about reactotron HOT 8 CLOSED

buschco avatar buschco commented on June 13, 2024 7
Compiling JS failed: 803620:268:')' expected at end of parenthesized expression Buffer size 35514497 starts with: 766172205f5f42554e444c455f535441

from reactotron.

Comments (8)

morganick avatar morganick commented on June 13, 2024

Hey @buschco, thanks for your patience. So far I have not been able to replicate your issue. I've created a bare app with Ignite and was able to connect it to Reactotron without issue.

I also upgraded the example application inside of this repo (#1460) to see if it had something to do with a newer version of React Native, but that also works as expected.

Hermes is supported as it is the default for RN. (https://reactnative.dev/docs/hermes)

I'm going to close this for now, but if you have additional information or a way for me to replicate the issue, please reopen and we'll take another look.

from reactotron.

buschco avatar buschco commented on June 13, 2024

I also was not able to reproduce it with a new created project.

However without hermes I faced another issue that could be a potential typescript version mismatch. Your packages state that typescript is no dependency, however for react-native you point your entry to a .ts file https://github.com/infinitered/reactotron/blob/master/lib/reactotron-react-native/package.json#L23C5-L23C38. You use satisfies often across your codebase which means, projects without typescript or with a typescript Version below 4.9.x wont be able to run. I fixed this by patching all package.jsons entry points:

diff --git a/node_modules/reactotron-react-native/package.json b/node_modules/reactotron-react-native/package.json
index 1fbbfdd..69bb92a 100644
--- a/node_modules/reactotron-react-native/package.json
+++ b/node_modules/reactotron-react-native/package.json
@@ -16,11 +16,11 @@
   "main": "dist/index.js",
   "module": "dist/index.esm.js",
   "types": "dist/types/src/index.d.ts",
-  "react-native": "src/index.ts",
+  "react-native": "./dist/index.js",
   "exports": {
     "import": "./dist/index.esm.js",
     "types": "./dist/types/src/index.d.ts",
-    "react-native": "./src/index.ts",
+  "react-native": "./dist/index.js",
     "default": "./dist/index.js"
   },
   "scripts": {

Note: if you use patch-package to perform this patch you will need to run it with --exclude 'nothing'.
For reactotron-react-native it would be:

yarn patch-package  --exclude 'nothing' reactotron-react-native`

Is there a reason why you point to a .ts file instead to the transpiled js files?

from reactotron.

rajeevCs avatar rajeevCs commented on June 13, 2024

i am also facing the similar issues, i have a n existing react native , i am tried to install reactotron in this ,i followed all the instructions

from reactotron.

alejandro25262 avatar alejandro25262 commented on June 13, 2024

same issue
my ReactotronConfig.js
import AsyncStorage from '@react-native-async-storage/async-storage';
import Reactotron from 'reactotron-react-native';

Reactotron.setAsyncStorageHandler(AsyncStorage) // AsyncStorage would either come from react-native or @react-native-community/async-storage depending on where you get it from
.configure() // controls connection & communication settings
.useReactNative() // add all built-in react native plugins
.connect(); // let's connect!

in my index.js i have
if (DEV) {
import('./ReactotronConfig')
.then(() => console.log('Reactotron Configured hola'))
.catch(error => console.log('test', error));
}

always enters in catch
error: Exception in HostFunction: Compiling JS failed: 125331:268:')' expected at end of parenthesized expression Buffer size 5932182 starts with: 5f5f642866756e6374696f6e2028676c and has protection mode(s): rw-p

from reactotron.

chetstone avatar chetstone commented on June 13, 2024

I just thought I'd try out reactotron on an existing project. I'm getting this error on an android hermes app:

Exception in HostFunction: Compiling JS failed: 150:268:')' expected at end of parenthesized expression Buffer size 10001 starts with: 5f5f642866756e6374696f6e2028676c]

Oddly, it still fails even if I try to disable reactotron by changing line 1 of index.js to:

if (false) {
  require('./ReactotronConfig');
}

to fix the error I have to comment out or remove the require completely!

I tried @BushCo hack but it didn't help.

My RN info:

'''
info Fetching system and libraries information...
System:
OS: macOS 14.3.1
CPU: (8) arm64 Apple M1 Pro
Memory: 126.92 MB / 16.00 GB
Shell:
version: 3.2.57
path: /bin/bash
Binaries:
Node:
version: 20.11.1
path: ~/.nodenv/versions/20.11.1/bin/node
Yarn:
version: 1.22.19
path: /opt/homebrew/bin/yarn
npm:
version: 10.2.4
path: ~/.nodenv/versions/20.11.1/bin/npm
Watchman:
version: 2022.11.28.00
path: /opt/homebrew/bin/watchman
Managers:
CocoaPods:
version: 1.12.1
path: /Users/chet/.rbenv/shims/pod
SDKs:
iOS SDK:
Platforms:
- DriverKit 23.2
- iOS 17.2
- macOS 14.2
- tvOS 17.2
- visionOS 1.0
- watchOS 10.2
Android SDK:
API Levels:
- "23"
- "24"
- "28"
- "30"
- "31"
- "33"
- "33"
- "34"
Build Tools:
- 28.0.3
- 30.0.2
- 30.0.3
- 31.0.0
- 33.0.0
- 33.0.2
- 33.0.3
- 34.0.0
System Images:
- android-31 | Google APIs ARM 64 v8a
- android-33 | Google APIs ARM 64 v8a
- android-34 | Google APIs ARM 64 v8a
Android NDK: Not Found
IDEs:
Android Studio: 2023.2 AI-232.10300.40.2321.11567975
Xcode:
version: 15.2/15C500b
path: /usr/bin/xcodebuild
Languages:
Java:
version: 11.0.18
path: /usr/bin/javac
Ruby:
version: 2.7.7
path: /Users/chet/.rbenv/shims/ruby
npmPackages:
"@react-native-community/cli": Not Found
react:
installed: 18.2.0
wanted: 18.2.0
react-native:
installed: 0.72.12
wanted: ^0.72.12
react-native-macos: Not Found
npmGlobalPackages:
"react-native": Not Found
Android:
hermesEnabled: true
newArchEnabled: false
iOS:
hermesEnabled: true
newArchEnabled: false

'''

from reactotron.

jbrodriguez avatar jbrodriguez commented on June 13, 2024

i'm getting a similar error as above
Exception in HostFunction: Compiling JS failed: 150:268:')' expected at end of parenthesized expression Buffer size 10001 starts with: 5f5f642866756e6374696f6e2028676c]

only the line:column changes

this is on 0.73.8 install

from reactotron.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.