electron-builder: Error when trying to build Windows App

Hi! Trying to build Mac OS app and it works just fine, but during building Windows App (on Mac) I got error:

	Administrators-MacBook-Pro:dtp_snapship_v1 sergeev$ node_modules/.bin/build --win --project ./app
	electron-builder 19.26.0
	Installing app dependencies for arch x64 to /Users/sergeev/Documents/Angular Projects/PRJ SnapShip/dtp_snapship_v1/app
	Packaging for win32 x64 using electron 1.7.5 to dist/win-unpacked
	Building NSIS installer
	  Packaging NSIS installer for arch x64
	Error: /Users/sergeev/Library/Caches/electron-builder/nsis/nsis-3.0.1.13/mac/makensis exited with code 1
	Output:
	Command line defined: "APP_ID=123"
	Command line defined: "APP_GUID=73ab94c8-5e8b-5484-aba9-aa812ed1c918"
	Command line defined: "PRODUCT_NAME=SnapShip"
	Command line defined: "PRODUCT_FILENAME=SnapShip"
	Command line defined: "APP_FILENAME=SnapShip"
	Command line defined: "APP_DESCRIPTION=Snaphip Desktop Application"
	Command line defined: "VERSION=1.0.0"
	Command line defined: "PROJECT_DIR=/Users/sergeev/Documents/Angular Projects/PRJ SnapShip/dtp_snapship_v1/app"
	Command line defined: "BUILD_RESOURCES_DIR=/Users/sergeev/Documents/Angular Projects/PRJ SnapShip/dtp_snapship_v1/app/build"
	Command line defined: "COMPANY_NAME=Vyacheslav Sergeev"
	Command line defined: "MUI_ICON=/Users/sergeev/Documents/Angular Projects/PRJ SnapShip/dtp_snapship_v1/app/mainLogo.ico"
	Command line defined: "MUI_UNICON=/Users/sergeev/Documents/Angular Projects/PRJ SnapShip/dtp_snapship_v1/app/mainLogo.ico"
	Command line defined: "APP_64=/Users/sergeev/Documents/Angular Projects/PRJ SnapShip/dtp_snapship_v1/app/dist/SnapShip-1.0.0-x64.nsis.7z"
	Command line defined: "APP_64_NAME=SnapShip-1.0.0-x64.nsis.7z"
	Command line defined: "COMPRESSION_METHOD=7z"
	Command line defined: "ONE_CLICK"
	Command line defined: "RUN_AFTER_FINISH"
	Command line defined: "SHORTCUT_NAME=SnapShip"
	Command line defined: "UNINSTALL_DISPLAY_NAME=SnapShip 1.0.0"
	Command line defined: "COMPRESS=auto"
	Command line defined: "BUILD_UNINSTALLER"
	Command line defined: "UNINSTALLER_OUT_FILE=Z:\private\var\folders\0p\vlv46mv10lbgpknsdr0_83mc0000gp\T\electron-builder-IUqVcV\1-uninstaller.exe"
	Processing script file: "<stdin>" (UTF8)

	Error output:
	!include: could not find: "SnapShip/dtp_snapship_v1/node_modules/electron-builder/templates/nsis/include/StdUtils.nsh"
	Error in script "<stdin>" on line 1 -- aborting creation process

	    at ChildProcess.childProcess.once.code (/Users/sergeev/Documents/Angular Projects/PRJ SnapShip/dtp_snapship_v1/node_modules/builder-util/src/util.ts:195:14)
	    at ChildProcess.g (events.js:291:16)
	    at emitTwo (events.js:106:13)
	    at ChildProcess.emit (events.js:191:7)
	    at maybeClose (internal/child_process.js:886:16)
	    at Process.ChildProcess._handle.onexit (internal/child_process.js:226:5)

My package.json:

{
	"name": "SnapShip",
	"author": "Vyacheslav Sergeev",
	"description": "Snaphip Desktop Application",
	"version": "1.0.0",
	"main": "main.js",
	"build": {
		"appId": "123",
		"mac": {
			"icon": "./mainLogo.icns",
			"category": "utility"
		},
		"win": {
			"icon": "./mainLogo.ico"
		}
	}
}

What am I doing wrong?

About this issue

  • Original URL
  • State: closed
  • Created 7 years ago
  • Comments: 16 (9 by maintainers)

Commits related to this issue

Most upvoted comments

I’m encountering the same issue (with version 19.16.2 of electron-builder). I do have the file node_modules/electron-builder/templates/nsis/include/StdUtils.nsh, however the complete path from root does contain spaces (just like @slavaspirit’s .../Angular Projects/PRJ SnapShip/...), which seems to be the problem here:

Error output: !include: could not find: "XXX\node_modules\electron-builder\templates\nsis\include\StdUtils.nsh"

Where XXX represents an incomplete path.

@develar what does it have to do with webpack?