This guide explains how to build a standalone desktop application (.exe) file that can run on any Windows machine without requiring Node.js to be installed.
- Install Node.js (if not already installed): https://nodejs.org/
- Install dependencies:
npm install
To run the Electron app in development mode:
npm run electronOr with DevTools open:
npm run electron:devnpm run build:winThis will create two files in the dist folder:
- Installer:
Auto Git Setup 1.0.0.exe- Full installer with NSIS - Portable:
AutoGit-1.0.0-portable.exe- Standalone executable (no installation needed)
npm run build:macnpm run build:linuxnpm run build- Run
Auto Git Setup 1.0.0.exe - Follow the installation wizard
- Launch from Start Menu or Desktop shortcut
- Double-click
AutoGit-1.0.0-portable.exe - The application will open in a window
- Desktop GUI: Native desktop application window
- No Browser Required: Runs as a standalone application
- Self-Contained: Includes Node.js runtime (no Node.js installation needed)
- Portable Option: Can run without installation
-
✅ No Node.js Required: The application bundles Node.js runtime inside the executable. Users do NOT need to install Node.js separately - just run the .exe file!
-
⚠️ Git Required: The application still requires Git to be installed on the system where it runs. The executable bundles Node.js but not Git itself. Users need to have Git installed and available in their system PATH. -
First Build: The first build may take several minutes as Electron Builder downloads Electron binaries and builds the application.
-
File Size: The executable will be approximately 100-150 MB as it includes the Electron runtime and all dependencies.
-
Port: The application runs a local server on
http://127.0.0.1:3000(or the port specified by the PORT environment variable) internally. You don't need to open a browser - the Electron window displays the UI.
- The
rcediterror ("Unable to commit changes") is usually non-fatal - the build continues - This error occurs when Windows Defender/antivirus locks the executable during metadata modification
- Solution: The configuration now disables executable signing/editing to avoid this issue
- If you still see errors, try:
- Temporarily disable Windows Defender during build
- Run as Administrator
- Close any antivirus software temporarily
- If you see
7zaerrors, it's usually during the NSIS installer compression step - The build may still succeed - check the
distfolder for.exefiles - Try building just the portable version:
electron-builder --win portable
- Make sure all dependencies are installed:
npm install - Check that you have internet connection (electron-builder downloads Electron binaries)
- Try deleting
node_modulesand reinstalling:rm -rf node_modules && npm install - On Windows, you may need to install Visual Studio Build Tools
- Clear electron-builder cache:
rm -rf %LOCALAPPDATA%\electron-builder\Cache
- Ensure Git is installed on the target machine
- Check Windows Defender or antivirus isn't blocking the executable
- Check the console output for error messages
- Make sure the
publicfolder is included in the build (it's configured in package.json) - Check that
index.htmlexists in thepublicfolder
- The application uses port 3000 by default
- If port 3000 is in use, the app will try to find an available port automatically
- Development: Run
npm run electron:dev- Opens DevTools and shows debug information - Production: Run
npm run build:win- Creates optimized production build