Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@electron/rebuild

Package Overview
Dependencies
Maintainers
1
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@electron/rebuild

Electron supporting package to rebuild native node modules against the currently installed electron

  • 3.6.1
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
271K
increased by0.31%
Maintainers
1
Weekly downloads
 
Created

What is @electron/rebuild?

@electron/rebuild is a tool designed to help developers rebuild native Node.js modules against the current Electron version. This is particularly useful when working with native modules that need to be compatible with Electron's version of Node.js.

What are @electron/rebuild's main functionalities?

Rebuild Native Modules

This feature allows you to rebuild native Node.js modules to be compatible with a specific version of Electron. The code sample demonstrates how to use the `rebuild` function to rebuild modules in the current directory for Electron version 13.1.7.

const { rebuild } = require('@electron/rebuild');

rebuild({
  buildPath: __dirname,
  electronVersion: '13.1.7'
}).then(() => {
  console.log('Rebuild complete!');
}).catch((err) => {
  console.error('Rebuild failed:', err);
});

CLI Usage

You can also use @electron/rebuild from the command line to rebuild native modules. This command rebuilds the modules for Electron version 13.1.7.

npx electron-rebuild -v 13.1.7

Rebuild Specific Modules

This feature allows you to rebuild specific native modules rather than all modules in the project. The code sample demonstrates how to rebuild only the 'native-module' for Electron version 13.1.7.

const { rebuild } = require('@electron/rebuild');

rebuild({
  buildPath: __dirname,
  electronVersion: '13.1.7',
  onlyModules: ['native-module']
}).then(() => {
  console.log('Rebuild complete!');
}).catch((err) => {
  console.error('Rebuild failed:', err);
});

Other packages similar to @electron/rebuild

Keywords

FAQs

Package last updated on 01 Oct 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc