electron-rebuild | rebuild native Node.js modules | Runtime Evironment library
kandi X-RAY | electron-rebuild Summary
kandi X-RAY | electron-rebuild Summary
This executable rebuilds native Node.js modules against the version of Node.js that your Electron project is using. This allows you to use native Node.js modules in Electron apps without your system version of Node.js matching exactly (which is often not the case, and sometimes not even possible).
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of electron-rebuild
electron-rebuild Key Features
electron-rebuild Examples and Code Snippets
Community Discussions
Trending Discussions on electron-rebuild
QUESTION
I try to rebuild an electron app but I got this error regarding the epoll installation.
...ANSWER
Answered 2021-Nov-09 at 06:01I have a same problem too, but i am using a serialport not epoll.
So, I think the cause of this problem is electron modules not the native module.
QUESTION
Actualy I try to intgrat but I face to this exception my node version is 16.3.2 32bit
...ANSWER
Answered 2022-Mar-17 at 08:03SOLVED BY @chilkat Software by upgrading the current version of chilkat/ck-electron16-win64 and win32
QUESTION
I am trying to open a sqlite3 database encrypted with sqlcipher. I have the password and I could open it successfully using sqlitebrowser.
I started my project using this template. It is based on the electron-forge webpack plugin.
When I type yarn start
, it creates a .webpack folder and all the compiled code goes in it. When I stop the terminal command, this folder disappears.
Then I wanted to use the package @journeyapps/sqlcipher to open my database, but this line is causing an error in the main process: const sqlite3 = require("@journeyapps/sqlcipher")
The error is:
Error: Cannot find module '<>/.webpack/main/native_modules/lib/binding/napi-v6-linux-x64/node_sqlite3.node'
The package documentation says two things about using it with electron-forge:
make sure that the folder node_modules/@journeyapps/sqlcipher/lib/binding/napi-v6-linux-x64 exists -> yes it exists
Disable rebuilding of this library using the onlyModules option of electron-rebuild in your package.json
"config": { "forge": { "electronRebuildConfig": { "onlyModules": [] // Specify other native modules here if required } }
-> I did it, I added the lines of code
I still have the error, but I feel it can be solved "easily" (with a lot more understanding of webpack than I have). Indeed, a solution would be to move the folder binding/napi-v6-linux-x64 into .webpack each time I launch the app, right?
I tried to do electron-rebuild -f -w sqlite3
, the rebuild succeeded but nothing happens, I still have the same error.
I am stuck here and cannot go further for my app, as it lays on reading this database. Should I start a new project and avoid using webpack? Do you have any example of a project where this package is successfully imported and used?
Thank you in advance for your help!
...ANSWER
Answered 2022-Jan-21 at 15:17Well, I finally figured it out. Actually, I tried so much little changes but I managed to make the app work (nearly) as expected.
How I found the solutionFirst: this doesn't have anything to do with the library sqlcipher itself. In fact, it's a webpack configuration problem while dealing with native libraries.
I started a fresh minimal install of electron-forge with Webpack and Typescript template (npx create-electron-app test-electron-forge-github --template=typescript-webpack
) and added sqlite3 and @journeyapps/sqlcipher. It worked so I made a lot of changes in my Webpack configuration to make it closer with the electron-forge one.
The changes I made broke Redux. I chose to sacrifice Redux in order to make sqlcipher work, as today I didn't find a solution for both of them to work.
Old Webpack configuration filesmain.webpack.js
QUESTION
I have an electron@2.0.16 app that needs usb
, but running electron-rebuilder I get this error
ANSWER
Answered 2021-Nov-26 at 05:14According to https://github.com/timfish/node-api-version/blob/master/index.js#L43
the earliest is 3.0.0-beta.1
QUESTION
When I pack my Ionic project with @capacitor-community/electron
packager (using electron-builder), I get the following error:
ANSWER
Answered 2021-Oct-03 at 18:22So, apparently problem lies in default publish method. You need to change your electron-builder.config.json
file to the following form (without the comment):
QUESTION
ANSWER
Answered 2021-Aug-26 at 14:14- Completely uninstall your globally installed version of Node
- Install a Node Version Manager:
- Linux/OSX - https://github.com/nvm-sh/nvm
- Windows 8+ - https://github.com/coreybutler/nvm-windows
- Windows 7 - https://github.com/nullivex/nodist
- Check the version of Node that is built in to NW.js
- https://nwjs.io/versions.json
- or
console.log(process.versions);
in NW.js
- Use your
nvm
tool of choice to install and switch to the matching Node version - Delete the
package-lock.json
andnode_modules
folder - Do
npm install
this will download/build files specific to your global Node versions, which should match the version built in to NW.js
With all that said, Vue-CLI's Webpack/Babel set up is designed to import/bundle/tree-shake BROWSER code, not NODE code. So doing import x from 'y'
won't work if it involves native code, node-bindings, executables, or Node specific code.
NW.js uses require
instead of import
to handle importing Node modules.
- See: NW-Vue-CLI-Example
You may also need to change your NW.js version if you are having issues with Node-GYP/NW-GYP:
QUESTION
I am trying to use pkcs11js in an electron app created with electron-forge using webpack template.
But I got the error
...ANSWER
Answered 2021-Jun-14 at 10:30You should use the Electron Forge Webpack template which has better support for native modules.
There is currently an open issue for this functionality caused by the outdated/unmaintained @marshallofsound/webpack-asset-relocator-loader
which caters for native modules via Webpack. I'm currently working on a PR to fix this but in the meantime you can use my updated fork.
QUESTION
I Know that there is a lot of topic about this, but since none of them work, I must make a new one, I'm quite confused as why my electron app doesn't launch when I used yarn dev
for my project, but when my friends try it, in his laptop, he can run and the apps launch normally without any problem, so Is there anyone here ever face the same problem with me? if there is someone, how can you solve this problem?
this is what my terminal looks like:
for information I used:
...ANSWER
Answered 2021-Apr-28 at 12:55This may be a silly answer. Try checking whether the task is running or any other programs interfereing the app, like an antivirus.
QUESTION
I'm building a project based off the Electron React Boilerplate project. I am running MacOS 10.15.7 and node v14.15.1.
I'm trying to install sqlite3
package. Since it's a native dependency, I ran yarn add sqlite3
inside the src/
directory, like it says to do here. The compilation fails with the following output:
ANSWER
Answered 2021-Mar-10 at 22:12I downgraded the sqlite3 package to v5.0.0 and it rebuilt correctly. Hope this helps anyone else with the same issue.
Source: nodejs electronjs sqlite3 - use of undeclared identifier 'napi_is_detached_arraybuffer'
QUESTION
I'm trying to implement autoupdate of my electron-react application using electron-updater and AWS S3 bucket. But getting error:
...ANSWER
Answered 2021-Feb-04 at 13:03As per the official documentation, you need to have something like this S3Options
AWS credentials are required, please see getting your credentials. Define
AWS_ACCESS_KEY_ID
andAWS_SECRET_ACCESS_KEY
environment variables. Or in the~/.aws/credentials
.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install electron-rebuild
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page