Skip to content
forked from electron/rebuild

Package to rebuild native Node.js modules against the currently installed Electron version

License

Notifications You must be signed in to change notification settings

citizenfx/rebuild

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CitizenFX Rebuild

NPM

This package is based on electron-rebuild.

This executable is rebuilding the native NodeJS modules you are using inside your FXServer resource against the NodeJS version that is used by the FXServer.

How does it work?

Install the rebuild as a dev dependency with --save-dev:

npm install --save-dev @citizenfx/rebuild

Then, whenever you install a new package inside your FXServer resource, rerun citizenfx-rebuild:

$(npm bin)/citizenfx-rebuild

Or if you're on Windows:

.\node_modules\.bin\citizenfx-rebuild.cmd

The same works inside a script in your package.json:

"scripts": {
  "rebuild": "citizenfx-rebuild -f"
}

and then

npm run rebuild

What are the requirements?

Node v22.6.0 or higher is required. Building native modules from source uses node-gyp, refer to the link for its installation/runtime requirements.

What if the NodeJS version changed inside the FXServer?

The citizenfx-rebuild can be manually adjusted to rebuild against the NodeJS version that is required by providing the version as a cli argument.

citizenfx-rebuild --nodeVersion 22.6.0

About

Package to rebuild native Node.js modules against the currently installed Electron version

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • TypeScript 84.5%
  • JavaScript 15.5%