-
Type: Bug
-
Resolution: Done
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: Node.js, React Native
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
- Download/clone the realm-js repo.
- In your local realm-js repo, in packages/realm, run the following commands:
- npm install
- npm run build
- npm link
- Download/clone the `docs-realm` repo.
- In the realmjs-v12 branch, navigate to examples/node/v12.
- Run npm install, then npm link realm.
- 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