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.

Cannot be used with Electron on Windows

See original GitHub issue

It would appear that it is not possible to run with Electron on Windows.

When run if built for node, the following message pops up :

App threw an error during load Error: The module ‘\?\C:\Users{SNIP}\rclnodejs\build\Release\rclnodejs.node’ was compiled against a different Node.js version using NODE_MODULE_VERSION 72. This version of Node.js requires NODE_MODULE_VERSION 73. Please try re-compiling or re-installing the module (for instance, using npm rebuild or npm install). at process.func (electron/js2c/asar.js:138:31) at process.func [as dlopen] (electron/js2c/asar.js:138:31) at Object.Module._extensions…node (internal/modules/cjs/loader.js:828:18) at Object.func (electron/js2c/asar.js:138:31) at Object.func [as .node] (electron/js2c/asar.js:138:31) at Module.load (internal/modules/cjs/loader.js:645:32) at Function.Module._load (internal/modules/cjs/loader.js:560:12) at Module.require (internal/modules/cjs/loader.js:685:19) at require (internal/modules/cjs/helpers.js:16:16) at bindings (C:\Users{SNIP}\rclnodejs\node_modules\bindings\bindings.js:112:48)

When I try to rebuild it for Electron using electron-rebuild, the build always fails, due to missing headers and dependencies. Once I manually resolve all those errors and it finally builds, running it for electron gives : “rclnodejs.node” is not a module.

When run for Node, without Electron, it works as expected.

Issue Analytics

  • State:open
  • Created 3 years ago
  • Comments:6 (2 by maintainers)

github_iconTop GitHub Comments

2reactions
adeelarshad83commented, Feb 9, 2022

@minggangw , @koonpeng

Thank you for your replies. I will keep you posted about the issue, soon I’ll update this issue thread. Also, it doesn’t build for any Electron version, not just the current one.

Hi @fstojanovic, are you able to resolve this issue

0reactions
newcanopiescommented, Jan 21, 2021

@koonpeng @fstojanovic does rclnodejs build with electron on WSL2 Ubuntu 20.04?

Thanks all!

Read more comments on GitHub >

github_iconTop Results From Across the Web

I can't run electron using node.js - Stack Overflow
Some APIs can only be used after this event occurs. app.on('ready', createWindow) // Quit when all windows are closed.
Read more >
Build Instructions (Windows) - Electron
Building Electron is done entirely with command-line scripts and cannot be done with Visual Studio.
Read more >
Common Configuration - electron-builder
If buildVersion is not defined and buildNumber (or one of the buildNumber envs) is defined, it will be used as a build version...
Read more >
A Comprehensive Guide to Building and Packaging an ...
Prerequisites for Packaging Windows Apps on Mac; electron-forge; electron-packager; electron-builder; Which Packaging Tool to Use ...
Read more >
Electron: Cross-platform Desktop Apps Made Easy - Toptal
I have not tested apps that use modules based on native C code, so I cannot confirm those would work. But basically you...
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