question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Error importing realm-js to Electron

See original GitHub issue

I tried import realm-js in my electron app.

at first, i installed and used require('realm') in my javascript code.

but when i started app, error occured like this

App threw an error during load
Error: Cannot find module '/home/youngkyun/git/multipad/node_modules/realm/compiled/electron-v1.4_linux_x64/realm.node'
    at Module._resolveFilename (module.js:455:15)
    at Function.Module._resolveFilename (/home/youngkyun/git/multipad/node_modules/electron/dist/resources/electron.asar/common/reset-search-paths.js:35:12)
    at Function.Module._load (module.js:403:25)
    at Module.require (module.js:483:17)
    at require (internal/module.js:20:19)
    at Object.<anonymous> (/home/youngkyun/git/multipad/node_modules/realm/lib/index.js:41:24)
    at Module._compile (module.js:556:32)
    at Object.Module._extensions..js (module.js:565:10)
    at Module.load (module.js:473:32)
    at tryModuleLoad (module.js:432:12)

as you see, log’s path is /home/youngkyun/git/multipad/node_modules/realm/compiled/electron-v1.4_linux_x64/realm.node

and installed path what i found was /home/youngkyun/git/multipad/node_modules/realm/compiled/node-v51_linux_x64/realm.node

and other test electron apps was same.

i can’t figure out what is a problem.

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Reactions:1
  • Comments:9 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
kristiandupontcommented, Jan 6, 2017

Note that we’ve seen this problem appear with the newest version of electron-rebuild. It seems that they have fixed it so it shouldn’t be a problem for long.

2reactions
kristiandupontcommented, Dec 30, 2016

Hi @chancethecoder, just to be clear, we are not officially supporting Electron yet. People have managed to make it work but we haven’t put in the work to offer proper support yet. I will look into this when I have some time.

Read more comments on GitHub >

github_iconTop Results From Across the Web

realm is compatible with electron - react? - error when ...
The error I got was: Uncaught Error: Must use import to load ES Module: /mnt/bla/test2/node_modules/@babel/runtime/helpers/esm/arrayWithHoles.  ...
Read more >
MongoDB Atlas App Services & Realm
This seems to be a very similar issue to this: Error importing realm-js to Electron ... Electron App Runtime Error - Cannot find...
Read more >
realm tutorial with electron + react does not work with ... - Reddit
Uncaught Error: Must use import to load ES Module: /mnt/502476F92476E180/test2/node_modules/@babel/runtime/helpers/esm/arrayWithHoles.js ...
Read more >
app | Electron
Imports the certificate in pkcs12 format into the platform certificate store. callback is called with the result of import operation, a value of...
Read more >
realm | Yarn - Package Manager
This project hosts the JavaScript versions of Realm. Currently we support React Native (JSC & Hermes on iOS & Android), Node.js and Electron...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found