reactotron icon indicating copy to clipboard operation
reactotron copied to clipboard

Missing Semicolon Build Error

Open vishalenrique opened this issue 1 year ago • 10 comments

I've started facing this issue since I moved to MacOS Sonoma 14.1.2 and XCode 15, there's a build error and it does not connect. Is anyone else facing this issue?

image

reactotron-react-native: "^5.0.4"

vishalenrique avatar Dec 18 '23 10:12 vishalenrique

You can run npx ignite-cli doctor and paste the results here?

Your error refers to this line: https://github.com/infinitered/reactotron/blob/master/lib/reactotron-react-native/src/reactotron-react-native.ts#L105, which is strange, because it's not the only line not to have semi-colons.

joshuayoes avatar Dec 20 '23 21:12 joshuayoes

Sure

System
  platform           darwin                      
  arch               x64                         
  cpu                10 cores     Apple M1 Pro   
  directory          vibhati      /Users/vibhati 

JavaScript (and globally-installed packages)
  node               12.22.12     /Users/vibhati/.nvm/versions/node/v12.22.12/bin/node 
  npm                6.14.16      /Users/vibhati/.nvm/versions/node/v12.22.12/bin/npm  
    npm              6.14.16                                                           
  yarn               1.22.19      /Users/vibhati/.yarn/bin/yarn                        
  pnpm               -            not installed                                        
  bun                -            not installed                                        
  expo               -            not installed                                        

Ignite
  ignite-cli         9.2.0        /Users/vibhati/.npm/_npx/90836/bin/ignite                        
  ignite src         build        /Users/vibhati/.npm/_npx/90836/lib/node_modules/ignite-cli/build 

Android
  java               11.0.11      /usr/bin/java                      
  android home       -            /Users/vibhati/Library/Android/Sdk 

iOS
  xcode              15.0.1     
  cocoapods          1.11.3       /Users/vibhati/.gem/ruby/2.7.6/bin/pod 

Tools
  git                git version 2.39.2   /opt/homebrew/bin/git 

vishalenrique avatar Dec 22 '23 09:12 vishalenrique

Also having the same issue.

EvanSays avatar Jan 03 '24 22:01 EvanSays

any solution for this issue?

velrajpaulraj avatar Jan 09 '24 09:01 velrajpaulraj

I am also having same issue.

sud77492 avatar Jan 26 '24 06:01 sud77492

@EvanSays @velrajpaulraj @sud77492 would ya'll be able to post a minimal reproduction? I'd be curious to see the metro.config.js you have

joshuayoes avatar Feb 15 '24 19:02 joshuayoes

@joshuayoes here's mine

// metro.config.js
module.exports = {
  transformer: {
    getTransformOptions: async () => ({
      transform: {
        experimentalImportSupport: false,
        inlineRequires: false,
      },
    }),
  },
};

Setup

  • M1 Pro
  • macOS 14.3.1
  • Node v14.17.0 (x64 architecture)

chrisehlee avatar Feb 21 '24 18:02 chrisehlee

I found the issue.

The satisfies operator was introduced with Typescript 4.9 and [babel supports this Typescript version since 7.20.0] link

While this backward compatibility issue is fixed, you can make it work by replacing the "satisfies" operator with "as" operator in all node_modules/reactotron-react-native and node_modules/reactotron-core-client

Hope this helps!

rajeshias avatar Feb 26 '24 08:02 rajeshias

UPDATE:

Install new dev plugin : ”@babel/preset-typescript": "^7.23.3"

the root cause is : satisfies is new keyword introduce in new ts version, so need to upgrade / install ts

npm install --save-dev @babel/preset-typescript

rajeshias avatar Feb 28 '24 04:02 rajeshias

I resolved this issue by update metro-react-native-babel-preset version My project react-native:0.68.0 metro version:0.59.0

Update metro version to 0.67.0

You can use this link to find the appropriate metro version of react native: https://react-native-community.github.io/upgrade-helper

luopeihai avatar May 08 '24 07:05 luopeihai