Uploaded image for project: 'Realm JavaScript SDK'
  1. Realm JavaScript SDK
  2. RJS-2385

`metro` hangs when importing `realm` with `inlineRequires` disabled

      How frequently does the bug occur?

      Always

      Description

      Hi, I am encountering an issue after upgrading my app to React Native v0.71.

      My app works and loads fine but as soon as I include the code below, my app tries to refresh and hangs indefinitely at "Bundling 100%" and never finishes. Bundler shows that everything went fine and there are not errors.

      Unable to find source-code formatter for language: jsx. Available languages are: actionscript, ada, applescript, bash, c, c#, c++, cpp, css, erlang, go, groovy, haskell, html, java, javascript, js, json, lua, none, nyan, objc, perl, php, python, r, rainbow, ruby, scala, sh, sql, swift, visualbasic, xml, yaml
      import Realm from 'realm'
      
      const tmp = new Realm() // or await Realm.open() I've tried both
      

      I am stumped because no error gets shown (in console, bundler nor device).

      I verified Hermes is enabled.
      This is the relevant part of package.json

      {
       "dependencies": {
          "realm": "11.5.0"
        },
        "devDependencies": {
          "@babel/core": "7.20.12",
          "@babel/plugin-proposal-decorators": "7.20.0",
          "@babel/preset-env": "^7.20.0",
          "@babel/preset-typescript": "7.21.5",
          "@babel/runtime": "7.20.7",
          "@react-native-community/eslint-config": "^3.2.0",
          "@tsconfig/react-native": "^2.0.2",
          "@react-native/eslint-config": "^0.72.2",
          "@types/lodash": "^4.14.194",
          "@types/react": "^18.1.0",
          "@types/react-native": "^0.70.0",
          "@types/react-test-renderer": "^18.0.0",
          "babel-plugin-inline-import": "^3.0.0",
          "babel-plugin-transform-inline-environment-variables": "0.4.4",
          "metro-react-native-babel-preset": "^0.76.3"
        }
      }
      

      Could anyone advise me on how to further investigate?

      Stacktrace & log output

      Unable to find source-code formatter for language: shell. Available languages are: actionscript, ada, applescript, bash, c, c#, c++, cpp, css, erlang, go, groovy, haskell, html, java, javascript, js, json, lua, none, nyan, objc, perl, php, python, r, rainbow, ruby, scala, sh, sql, swift, visualbasic, xml, yaml
      No error output
      

      Can you reproduce the bug?

      Always

      Reproduction Steps

      No response

      Version

      11.5

      What services are you using?

      Local Database only

      Are you using encryption?

      No

      Platform OS and version(s)

      iOS 16.3.1

      Build environment

      Which debugger for React Native:

      Cocoapods version

      1.11.3

            Assignee:
            Unassigned Unassigned
            Reporter:
            unitosyncbot Unito Sync Bot
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: