question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Error when trying to build Windows App

See original GitHub issue

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?

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:16 (9 by maintainers)

github_iconTop GitHub Comments

1reaction
martinfilliaucommented, Aug 28, 2017

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?

0reactions
martinfilliaucommented, Aug 28, 2017

👍 all good

Thanks for the quick fix!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Fix problems with apps from Microsoft Store
Fix problems with apps from Microsoft Store · Make sure Windows is up to date. Select Start > Settings > Windows Update >...
Read more >
How to Fix the "This App Can't Run on Your PC" Error in ...
Right-click the app's executable file and select Properties. Open the Compatibility tab, check Run this program in compatibility mode for, and ...
Read more >
Error when trying to build for Windows · Issue #137 - GitHub
It may be the platform problem, that is, it is necessary for the native binary for Windows to be built on the same...
Read more >
Flutter Error when trying to debug Windows App - Stack Overflow
Create a new application. run flutter run -d windows --debug Expected results: The build should success. Actual results: Can't load AOT data ...
Read more >
Top 10 Solutions to Fix This App Can't Run on Your PC in Win ...
Solution 3: Create a New Administrator Account ... "This app can't run on your PC" error may appear when trying to open some...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found