Exposing disk image size option to user
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 35/100
- Issue type
- Feature
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- javascript
- Domain
- build-system
Research direction
The issue shows the failing hdiutil create invocation and the maker-dmg AdditionalDMGOptions configuration; start by tracing how node-appdmg assembles that command. Compare the requested --disk-img-size behavior with the current -size handling, then verify that a configured image size is passed through and prevents the reported no-space failure.
Written by the indexing model from the issue text.
Description
I'm forwarding a problem I had when I build DMG with electron-forge, which is said to be an appdmg limitation.
TL;DR: Can node-appdmg expose an option similar to --disk-img-size of create-dmg ??
Please see below.
Issue Details
- Electron Forge Version:
- 6.0.0-beta.53
- Electron Version:
- Operating System:
- macOS 10.15.7
- Last Known Working Electron Forge version::
- N/A
Expected Behavior
I'd love to insert custom data into the app folder and have them included into the DMG and show up in the mounted folder.
Actual Behavior
Trying to insert additional data into the output app folder and include it into the DMG, but after firing up a maker process, I saw a size calculation error that breaks the build
Making for the following targets: dmg
✖ Making for target: dmg - On platform: darwin - For arch: x64
An unhandled error has occurred inside Forge:
An error occured while making for target: dmg
Command failed: hdiutil create /var/folders/5j/ybqw096s7c162l_lgby0plw00000gn/T/N8YZNXR.dmg -ov -fs HFS+ -size 7313m -volname MAM-Hub
hdiutil: create failed - No space left on device
the size argument is incorrect and after digging into the source code of electron-forge, I found that this size is calculated internally and the hdiutil -size argument is not exposed.
To Reproduce
- Create an Electron app and build it with
electron-forge; - Add a folder of data, in my case, another dependency PKG installer and its own supporting data, into the output folder;
- Build the app with yarn or npm;
You should see the similar error above.
Additional Information
Here is my package.json
{
"name": "myapp",
"productName": "myapp",
"version": "0.10.1",
"description": "my app",
"main": "src/main.js",
"scripts": {
"start": "electron-forge start",
"package": "electron-forge package",
"make": "electron-forge make",
"publish": "electron-forge publish",
"lint": "echo \"No linting configured\""
},
"keywords": [],
"author": {
"name": "me",
"email": "me@me.com"
},
"license": "MIT",
"config": {
"forge": {
"packagerConfig": {
"icon": "src/images/myicon",
"ignore": [
"/.gitignore",
"/.vscode",
"/yarn.lock",
"/node_modules/xyz/10.1.2/",
"/node_modules/xyz/build/",
"/node_modules/xyz/prebuilds/linux*"
]
},
"osxSign": {
"entitlements": "entitlements.plist",
"entitlements-inherit": "entitlements.plist",
"gatekeeper-assess": false,
"hardened-runtime": true,
"identity": "my id",
"signature-flags": "library"
},
"osxNotarize": "require:./notarize.js",
"hooks": "require:./hooks.js",
"makers": [
{
"name": "@electron-forge/maker-dmg",
"platforms": [
"darwin"
],
"config": {
"AdditionalDMGOptions": {
"code-sign": {
"identifier": "my certificate",
"signing-identity": "my cert id"
},
"contents": [
{
"name": "MAM-hub",
"path": "src/myapp/out/myapp-darwin-x64/myapp.app",
"type": "file",
"x": 370,
"y": 260
},
{
"name": "Applications",
"path": "/Applications",
"type": "link",
"x": 670,
"y": 260
},
{
"name": "My Dependency",
"path": "src/mam-hub/out/mam-hub-darwin-x64/mydep",
"type": "file",
"x": 240,
"y": 260
},
{
"name": "INSTALL.html",
"path": "../../temp/INSTALL_en.html",
"x": 240,
"y": 400
},
{
"name": "安装指南.html",
"path": "../../temp/INSTALL_zhs.html",
"x": 370,
"y": 400
}
],
"window": {
"position": {
"x": 200,
"y": 120
},
"size": {
"height": 660,
"width": 1020
}
}
},
"background": "../../res/installer/macos/background-orange.png",
"format": "UDZO",
"icon": "src/images/myapp.icns",
"iconSize": 90,
"name": "myapp",
"overwrite": true
}
},
{
"name": "@electron-forge/maker-wix",
"platforms": [
"win32"
],
"config": {
"arch": "x64",
"appUserModelId": "com.me.myapp",
"description": "description of myapp",
"exe": "myapp",
"iconPath": "src\\images\\me.ico",
"language": 1033,
"manufacturer": "me",
"name": "my app",
"programFilesFolderName": "myapp",
"shortName": "myapp",
"shortcutFolderName": "myapp",
"ui": {
"chooseDirectory": true,
"images": {
"background": "C:\\Temp\\background-orange.png",
"banner": "C:\\Temp\\banner-orange.png"
}
},
"version": "1.0.0"
}
}
]
}
},
"dependencies": {
"buffer-from": "^1.1.1",
"zeromq": "^6.0.0-beta.6"
},
"devDependencies": {
"@electron-forge/cli": "6.0.0-beta.53",
"@electron-forge/maker-dmg": "6.0.0-beta.53",
"@electron-forge/maker-wix": "6.0.0-beta.53",
"electron": "10.1.2"
}
}
- Dominant language
- JavaScript
- Stars
- 1.7k
- Forks
- 158
- PR merge metrics
- No merged PRs in 30d
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from LinusU/node-appdmg
-
Security: vulnerable dependency image-size (CVE-2025-71329/71330) — maintained drop-in available Open
Difficulty 2/5 1-3 hours Newbie friendliness 58/100
LinusU/node-appdmg#249 ·
-
Security: vulnerable dependency image-size (CVE-2025-71329/71330) — maintained drop-in available Open
Difficulty 2/5 1-3 hours Newbie friendliness 55/100
LinusU/node-appdmg#248 ·
-
Security: vulnerable dependency image-size (CVE-2025-71329/71330) — maintained drop-in available Open
Difficulty 2/5 1-3 hours Newbie friendliness 52/100
LinusU/node-appdmg#247 ·
-
Difficulty 3/5 1-2 days Newbie friendliness 35/100
LinusU/node-appdmg#245 ·
-
Install failed Open
Difficulty 4/5 3-5 days Newbie friendliness 25/100
LinusU/node-appdmg#244 · 1 comment ·
All issues in LinusU/node-appdmg
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
HarperFast/skills#96 ·
-
[Block] Latest Posts [Type] Bug
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Automattic/studio#4908 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
sugarlabs/musicblocks#8847 ·