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

Realm library doesn't work with Electron React Boilerplate

      How frequently does the bug occur?

      Always

      Description

      Realm library doesn't work with Electron React Boilerplate. It throws this error "Module not found: Error: Can't resolve 'react-native' in './node_modules/realm/lib'"

      Since Electron React Boilerplate is the most popular boilerplate on Electron, you should fix or document this issue.

      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
      Uncaught Error: Unexpected execution environment (chromedebugger)
          at ./node_modules/realm/lib/index.js (index.js:23:1)
          at options.factory (react refresh:6:1)
          at __webpack_require__ (bootstrap:24:1)
          at fn (hot module replacement:62:1)
          at ./src/renderer/dataAccess/test.ts (stackframe.js:143:2)
          at options.factory (react refresh:6:1)
          at __webpack_require__ (bootstrap:24:1)
          at fn (hot module replacement:62:1)
          at ./src/renderer/sagas/sagas.ts (index.ts:10:2)
          at options.factory (react refresh:6:1)
      
      WARNING in ./node_modules/realm/lib/utils.js 22:9-31
      
      Critical dependency: the request of a dependency is an expression
      
      
      WARNING in ./node_modules/realm/lib/utils.js 159:29-52
      
      Module not found: Error: Can't resolve 'react-native' in './node_modules/realm/lib'
      Did you mean './react-native'?
      Requests that should resolve in the current directory need to start with './'.
      Requests that start with a name are treated as module requests and resolve within module directories (/DIRECTORY/src, node_modules).
      If changing the source code is not an option there is also a resolve options called 'preferRelative' which tries to resolve these kind of requests in the current directory too.
      

      Can you reproduce the bug?

      Always

      Reproduction Steps

      No response

      Version

      11.5.1

      What services are you using?

      Atlas Device Sync

      Are you using encryption?

      No

      Platform OS and version(s)

      MacOS 12.6.2

      Build environment

      Which debugger for React Native: ..
      Electron

      Cocoapods version

      No response

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

              Created:
              Updated: