I am trying to rebuild my ElectronJS application with Sqlite3, I have installed Python, VS development tools but its still gives me the error: My Package.json:
{
"name": "hello",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"start": "electron .",
"rebuild": "electron-rebuild -f -w sqlite3",
"postinstall": "electron-builder install-app-deps"
},
"keywords": [],
"author": "",
"license": "ISC",
"dependencies": {
"electron": "^8.2.1",
"sqlite3": "^4.1.1"
},
"devDependencies": {
"electron-rebuild": "^1.10.1"
}
}
To use electron-rebuild it has mentioned following requirements ;
What are the requirements? Node v6.0.0 or higher is required. Building the native modules from source uses
node-gyp
, refer to the link for its installation/runtime requirements.
you need to install gyp (it will be installed by the electron-rebuild) and configure the build tools for the operating system. Here is the building option for windows as mentioned on the docs
On Windows
Install the current version of Python from the Microsoft Store package.
Option 1 Install all the required tools and configurations using Microsoft's windows-build-tools using npm install --global --production windows-build-tools from an elevated PowerShell or CMD.exe (run as Administrator).
Option 2 Install tools and configuration manually:
Install Visual C++ Build Environment: Visual Studio Build Tools (using "Visual C++ build tools" workload) or Visual Studio 2017 Community (using the "Desktop development with C++" workload) Launch cmd, npm config set msvs_version 2017 If the above steps didn't work for you, please visit Microsoft's Node.js Guidelines for Windows for additional tips.
To target native ARM64 Node.js on Windows 10 on ARM, add the components "Visual C++ compilers and libraries for ARM64" and "Visual C++ ATL for ARM64".