This guide explains how to compile the launcher script into a standalone .exe file using Node.js and pkg.
- Windows 10 or 11
- Internet connection
- Basic familiarity with command line (Command Prompt or PowerShell)
-
Go to https://nodejs.org/
-
Download and install the LTS version for Windows.
-
Verify the installation by opening a terminal and running:
node -v npm -v
Step 2: Install pkg Open a terminal (Command Prompt or PowerShell), then run: npm install -g pkg This installs pkg globally, allowing you to use it from any directory.
Step 3: Navigate to the Launcher Folder Change the directory to where your launcher files are located (this folder should contain launcher.js and package.json).
Example: cd C:\Path\To\EqualityRP_Launcher Step 4: Compile the EXE Run the following command to build the executable:
pkg . This will bundle the application and generate an executable (e.g. fivem-launcher.exe) inside the dist/ folder.
Completion You will find the compiled executable here:
EqualityRP_Launcher\dist\fivem-launcher.exe Run the .exe file by double-clicking it. It will open your default browser, which then launches FiveM.
Troubleshooting 'pkg' is not recognized error: This means pkg is not installed globally or the terminal needs to be restarted. Try reinstalling with:
npm install -g pkg Firewall prompts when launching the EXE: This is normal because the executable opens a browser window. Allow access to proceed.
Optional Customization You can modify launcher.js or other files to change the server link or behavior before compiling.