Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ENOSPC: no space left on device when building mac dmg #821

Closed
nunziotocci opened this issue Oct 13, 2016 · 4 comments · May be fixed by qcif/data-curator#563
Closed

ENOSPC: no space left on device when building mac dmg #821

nunziotocci opened this issue Oct 13, 2016 · 4 comments · May be fixed by qcif/data-curator#563

Comments

@nunziotocci
Copy link
Contributor

  • Version: 7.12.2
  • Target: dmg

When I run npm dist on my project on OS X 10.11 El Capitan, electron-builder outputs this:

$ npm run dist

> @ dist /Users/nunzio/Repos/postage/postage_electron
> build

Rebuilding app dependencies for arch x64 to /Users/nunzio/Repos/postage/postage_electron/app

Packaging for platform darwin x64 using electron 1.4.3 to dist/mac

Warning: App is not signed: CSC_LINK is not specified, and no valid identity in the keychain, see https://github.com/electron-userland/electron-builder/wiki/Code-Signing
Must be "Developer ID Application:" or custom non-Apple code signing certificate
Creating DMG
Warning: dmg.title is not supported, file issue if need
Creating MacOS zip

Then waits a minute or so, then spews out a bunch of messages of the form:

Error: ENOSPC: no space left on device, open '/Volumes/Postage 3.0.0-RC2/.VolumeIcon.icns/node_modules/plist/.jshintrc',

It was working with 7.10.2 with an explicit path on build.dmg.contents[1]

When I upgraded to 7.12.2, I got an error, "Cannot read proprty 'x' of undefined", this lead me to #799, so I removed the explicit path on build.dmg.contents[1]

Then I got this error.

It is worth noting that I embed a binary inside the app with a bunch of html:

$ du -hs app/postage/*
8.0K    app/postage/config          <<<<< this is the default config
2.3M    app/postage/postage         <<<<< this is the binary
 13M    app/postage/web_root        <<<<< this is the html/js

The repo is at workflowproducts/postage under postage_electron/

To reproduce:
clone, and go into the resulting repo:

$ ./configure && make all
$ cd postage_electron
$ ./update.sh
$ npm run dist

Here is my package.json

{
    "build": {
        "appId": "your.id",
        "asar": false,
        "mac": {
            "category": "public.app-category.developer-tools"
        },
        "win": {
            "target": "nsis"
        },
        "linux": {
            "target": [
                "deb",
                "rpm"
            ]
        },
        "rpm": {
            "depends": "postgresql-libs"
        },
        "deb": {
            "depends": "libpq5"
        },
        "dmg": {
            "title": "Postage",
            "icon": "",
            "contents": [
                { "x": 448, "y": 344, "type": "link", "path": "/Applications" },
                { "x": 192, "y": 344 }
            ]
        }
    },
    "devDependencies": {
        "electron": "^1.4.2",
        "electron-builder": "^7.10.2"
    },
    "homepage": "https://github.com/workflowproducts/postage/blob/master/README.md",
    "keywords": [
        "Postage",
        "Electron",
        "PostgreSQL"
    ],
    "repository": {
        "type": "git",
        "url": "git+https://github.com/workflowproducts/postage.git"
    },
    "scripts": {
        "start": "electron app",
        "pack": "build --dir",
        "dist": "build",
        "dist-win": "build --arch all"
    }
}

Here is my npm-debug.log:

0 info it worked if it ends with ok
1 verbose cli [ '/usr/local/Cellar/node/6.7.0/bin/node',
1 verbose cli   '/usr/local/bin/npm',
1 verbose cli   'run',
1 verbose cli   'dist' ]
2 info using [email protected]
3 info using [email protected]
4 verbose run-script [ 'predist', 'dist', 'postdist' ]
5 info lifecycle @~predist: @
6 silly lifecycle @~predist: no script for predist, continuing
7 info lifecycle @~dist: @
8 verbose lifecycle @~dist: unsafe-perm in lifecycle true
9 verbose lifecycle @~dist: PATH: /usr/local/lib/node_modules/npm/bin/node-gyp-bin:/Users/nunzio/Repos/postage/postage_electron/node_modules/.bin:/usr/local/Cellar/node/6.7.0/bin:/opt/local/bin:/opt/local/sbin:/opt/local/bin:/opt/local/sbin:/usr/local/Cellar/m4/1.4.17/bin/:/usr/local/sbin:/Users/nunzio/Desktop/Projects/Programming/OSes/SimpleOS/cross_compiler/bin:/usr/local/pgsql/bin:/opt/local/bin:/opt/local/sbin:/usr/local/Cellar/gcc/5.3.0/bin/:/usr/local/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin:/opt/node/bin:/Users/nunzio/Downloads/emsdk-portable/emsdk_portable:/Users/nunzio/Downloads/emsdk-portable/emsdk_portable/clang/e1.27.0_64bit:/Users/nunzio/Downloads/emsdk-portable/emsdk_portable/node/0.10.18_64bit/bin:/Users/nunzio/Downloads/emsdk-portable/emsdk_portable/emscripten/1.27.0:/Users/nunzio/wine-1.6.2/tools/winegcc/:/Users/nunzio/Repos/xcbuild/build
10 verbose lifecycle @~dist: CWD: /Users/nunzio/Repos/postage/postage_electron
11 silly lifecycle @~dist: Args: [ '-c', 'build' ]
12 silly lifecycle @~dist: Returned: code: 255  signal: null
13 info lifecycle @~dist: Failed to exec dist script
14 verbose stack Error: @ dist: `build`
14 verbose stack Exit status 255
14 verbose stack     at EventEmitter.<anonymous> (/usr/local/lib/node_modules/npm/lib/utils/lifecycle.js:255:16)
14 verbose stack     at emitTwo (events.js:106:13)
14 verbose stack     at EventEmitter.emit (events.js:191:7)
14 verbose stack     at ChildProcess.<anonymous> (/usr/local/lib/node_modules/npm/lib/utils/spawn.js:40:14)
14 verbose stack     at emitTwo (events.js:106:13)
14 verbose stack     at ChildProcess.emit (events.js:191:7)
14 verbose stack     at maybeClose (internal/child_process.js:877:16)
14 verbose stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:226:5)
15 verbose pkgid @
16 verbose cwd /Users/nunzio/Repos/postage/postage_electron
17 error Darwin 15.6.0
18 error argv "/usr/local/Cellar/node/6.7.0/bin/node" "/usr/local/bin/npm" "run" "dist"
19 error node v6.7.0
20 error npm  v3.10.7
21 error code ELIFECYCLE
22 error @ dist: `build`
22 error Exit status 255
23 error Failed at the @ dist script 'build'.
23 error Make sure you have the latest version of node.js and npm installed.
23 error If you do, this is most likely a problem with the  package,
23 error not with npm itself.
23 error Tell the author that this fails on your system:
23 error     build
23 error You can get information on how to open an issue for this project with:
23 error     npm bugs
23 error Or if that isn't available, you can get their info via:
23 error     npm owner ls
23 error There is likely additional logging output above.
24 verbose exit [ 1, true ]
@develar
Copy link
Member

develar commented Oct 13, 2016

Do not specify "icon": "" in your package.json.

@develar
Copy link
Member

develar commented Oct 13, 2016

Checks added, case "Cannot read proprty 'x' of undefined". Thanks a lot for project.

@nunziotocci
Copy link
Contributor Author

That worked, but my app icon is not suitable to be the dmg icon, so I changed it to "icon": null for now.

Thank you for your quick response.

@develar
Copy link
Member

develar commented Oct 13, 2016

JFYI: Setting to null is valid and supported way.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants