Follow these steps to build the final desktop application for your platform.
Ensure you are using Node.js version 20 before running any commands. You can check your Node.js version with:
node -vThen:
npm install
npm run buildInstall Electron as a development dependency:
npm install --save-dev electronAlso, install Electron Builder as a development dependency:
npm i --save-dev electron-builderNow, you're ready to build the application for different platforms. If you encounter an error, continue to Step 4 and retry Step 3.
For macOS:
npm run dist:macFor Windows:
npm run dist:winFor Linux:
npm run dist:linuxIf you encounter an error while building, transpile the application for Electron by running:
npm run transpile:electronNote: You might encounter an error in the terminal during this step. This is normal. Just save the changes, and you should see a new
dist-electronfolder created. After this, retry Step 3.
Once the build process is complete, the final desktop application for your selected platform will be ready. This will be the dist file.