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

Building from source results in error related to the logger

      How frequently does the bug occur?

      Always

      Description

      I expected to be able to use npm link or npm pack to use the latest features that have been added but not included in a release.

      Building from source and using Realm.js in the docs test suite using npm link and by creating a .tgz file with npm pack.

      In both cases, running my tests results in the following error:
      TypeError: _native_Helpers_make_logger is not a function.

      Running tests in my local realm-js repo is all green. This seems to be an issue with bindgen and bundling.

      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
      FAIL   TypeScript  __tests__/quickstart.test.ts
        ● Test suite failed to run
      
          TypeError: _native_Helpers_make_logger is not a function
      
            1628 |   }
            1629 |   static makeLogger(log) {
          > 1630 |     return _native_Helpers_make_logger(log);
                 |            ^
            1631 |   }
            1632 |   static simulateSyncError(session, code, message, type, is_fatal) {
            1633 |     return _native_Helpers_simulate_sync_error(session, code, message, type, is_fatal);
      
            at Function.makeLogger (../../../../realm-js/packages/realm/dist/bundle.node.js:1630:12)
            at Function.setLogger (../../../../realm-js/packages/realm/dist/bundle.node.js:9587:32)
            at Object.<anonymous> (../../../../realm-js/packages/realm/dist/bundle.node.js:10413:7)
            at Object.<anonymous> (jestSetup.ts:2:1)
      

      Can you reproduce the bug?

      Always

      Reproduction Steps

      1. Download/clone the realm-js repo.
      2. In your local realm-js repo, in packages/realm, run the following commands:
        • npm install
        • npm run build
        • npm link
      3. Download/clone the `docs-realm` repo.
      4. In the realmjs-v12 branch, navigate to examples/node/v12.
      5. Run npm install, then npm link realm.
      6. Run tests with npm run test:ts.

      Version

      Build from source

      What services are you using?

      Local Database only

      Are you using encryption?

      No

      Platform OS and version(s)

      macOS Ventura 13.4

      Build environment

      Using Node.js v18.16.0.

      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: