Electron-builder: install-app-deps fails

Created on 15 Sep 2016  ·  19Comments  ·  Source: electron-userland/electron-builder

Which version of electron-builder are you using?

  • 6.7.3:

What target are you building for?

  • mac

I'm using two package.json files, one for app and one for the project.

I'm executing npm install in the project root which executes install-app-deps. That command fails. This is the output:

npm WARN optional dep failed, continuing [email protected]
npm WARN optional dep failed, continuing [email protected]
npm WARN deprecated [email protected]: cross-spawn no longer requires a build toolchain, use it instead!

> [email protected] install /Users/tim/git/blackbeard/xxx-dracarys/node_modules/electron-builder/node_modules/appdmg/node_modules/fs-xattr
> node-gyp rebuild

gyp WARN download NVM_NODEJS_ORG_MIRROR is deprecated and will be removed in node-gyp v4, please use NODEJS_ORG_MIRROR
gyp WARN download NVM_NODEJS_ORG_MIRROR is deprecated and will be removed in node-gyp v4, please use NODEJS_ORG_MIRROR
gyp WARN download NVM_NODEJS_ORG_MIRROR is deprecated and will be removed in node-gyp v4, please use NODEJS_ORG_MIRROR
  CXX(target) Release/obj.target/xattr/src/async.o
  CXX(target) Release/obj.target/xattr/src/error.o
  CXX(target) Release/obj.target/xattr/src/sync.o
  CXX(target) Release/obj.target/xattr/src/util.o
  CXX(target) Release/obj.target/xattr/src/xattr.o
  SOLINK_MODULE(target) Release/xattr.node

> [email protected] install /Users/tim/git/blackbeard/xxx-dracarys/node_modules/electron-builder/node_modules/appdmg/node_modules/ds-store/node_modules/macos-alias
> node-gyp rebuild

gyp WARN download NVM_NODEJS_ORG_MIRROR is deprecated and will be removed in node-gyp v4, please use NODEJS_ORG_MIRROR
gyp WARN download NVM_NODEJS_ORG_MIRROR is deprecated and will be removed in node-gyp v4, please use NODEJS_ORG_MIRROR
gyp WARN download NVM_NODEJS_ORG_MIRROR is deprecated and will be removed in node-gyp v4, please use NODEJS_ORG_MIRROR
  CXX(target) Release/obj.target/volume/src/volume.o
  SOLINK_MODULE(target) Release/volume.node

> @ postinstall /Users/tim/git/blackbeard/xxx-dracarys
> install-app-deps

Installing app dependencies for arch x64 to /Users/tim/git/blackbeard/xxx-dracarys/build

Error: /Users/tim/.nvm/versions/node/v4.5.0/bin/node exited with code 1
Output:

> @ postinstall /Users/tim/git/blackbeard/xxx-dracarys
> install-app-deps

Installing app dependencies for arch x64 to /Users/tim/git/blackbeard/xxx-dracarys/build


Error output:
Error: /Users/tim/.nvm/versions/node/v4.5.0/bin/node exited with code 1
Output:

> @ postinstall /Users/tim/git/blackbeard/xxx-dracarys
> install-app-deps

Installing app dependencies for arch x64 to /Users/tim/git/blackbeard/xxx-dracarys/build


Error output:
Error: /Users/tim/.nvm/versions/node/v4.5.0/bin/node exited with code 1
Output:

> @ postinstall /Users/tim/git/blackbeard/xxx-dracarys
> install-app-deps

Installing app dependencies for arch x64 to /Users/tim/git/blackbeard/xxx-dracarys/build


Error output:
Error: /Users/tim/.nvm/versions/node/v4.5.0/bin/node exited with code 1
Output:

> @ postinstall /Users/tim/git/blackbeard/xxx-dracarys
> install-app-deps

Installing app dependencies for arch x64 to /Users/tim/git/blackbeard/xxx-dracarys/build


Error output:
Error: /Users/tim/.nvm/versions/node/v4.5.0/bin/node exited with code 1
Output:

> @ postinstall /Users/tim/git/blackbeard/xxx-dracarys
> install-app-deps

Installing app dependencies for arch x64 to /Users/tim/git/blackbeard/xxx-dracarys/build


Error output:
Error: /Users/tim/.nvm/versions/node/v4.5.0/bin/node exited with code 1
Output:

> @ postinstall /Users/tim/git/blackbeard/xxx-dracarys
> install-app-deps

Installing app dependencies for arch x64 to /Users/tim/git/blackbeard/xxx-dracarys/build


Error output:
Error: /Users/tim/.nvm/versions/node/v4.5.0/bin/node exited with code 1
Output:

> @ postinstall /Users/tim/git/blackbeard/xxx-dracarys
> install-app-deps

Installing app dependencies for arch x64 to /Users/tim/git/blackbeard/xxx-dracarys/build


Error output:
Error: /Users/tim/.nvm/versions/node/v4.5.0/bin/node exited with code 1
Output:

> @ postinstall /Users/tim/git/blackbeard/xxx-dracarys
> install-app-deps

Installing app dependencies for arch x64 to /Users/tim/git/blackbeard/xxx-dracarys/build


Error output:
Error: /Users/tim/.nvm/versions/node/v4.5.0/bin/node exited with code 1
Output:

> @ postinstall /Users/tim/git/blackbeard/xxx-dracarys
> install-app-deps

Installing app dependencies for arch x64 to /Users/tim/git/blackbeard/xxx-dracarys/build


Error output:
Error: /Users/tim/.nvm/versions/node/v4.5.0/bin/node exited with code 1
Output:

> @ postinstall /Users/tim/git/blackbeard/xxx-dracarys
> install-app-deps

Installing app dependencies for arch x64 to /Users/tim/git/blackbeard/xxx-dracarys/build


Error output:
Error: /Users/tim/.nvm/versions/node/v4.5.0/bin/node exited with code 1
Output:

> @ postinstall /Users/tim/git/blackbeard/xxx-dracarys
> install-app-deps

Installing app dependencies for arch x64 to /Users/tim/git/blackbeard/xxx-dracarys/build


Error output:
Error: /Users/tim/.nvm/versions/node/v4.5.0/bin/node exited with code 1
Output:

> @ postinstall /Users/tim/git/blackbeard/xxx-dracarys
> install-app-deps

Installing app dependencies for arch x64 to /Users/tim/git/blackbeard/xxx-dracarys/build


Error output:
Error: /Users/tim/.nvm/versions/node/v4.5.0/bin/node exited with code 1
Output:

> @ postinstall /Users/tim/git/blackbeard/xxx-dracarys
> install-app-deps

Installing app dependencies for arch x64 to /Users/tim/git/blackbeard/xxx-dracarys/build


Error output:
Error: /Users/tim/.nvm/versions/node/v4.5.0/bin/node exited with code 1
Output:

> @ postinstall /Users/tim/git/blackbeard/xxx-dracarys
> install-app-deps

Installing app dependencies for arch x64 to /Users/tim/git/blackbeard/xxx-dracarys/build


Error output:
Error: /Users/tim/.nvm/versions/node/v4.5.0/bin/node exited with code 1
Output:

> @ postinstall /Users/tim/git/blackbeard/xxx-dracarys
> install-app-deps

Installing app dependencies for arch x64 to /Users/tim/git/blackbeard/xxx-dracarys/build


Error output:
Error: /Users/tim/.nvm/versions/node/v4.5.0/bin/node exited with code 1
Output:

> @ postinstall /Users/tim/git/blackbeard/xxx-dracarys
> install-app-deps

Installing app dependencies for arch x64 to /Users/tim/git/blackbeard/xxx-dracarys/build


Error output:
Error: /Users/tim/.nvm/versions/node/v4.5.0/bin/node exited with code 1
Output:

> @ postinstall /Users/tim/git/blackbeard/xxx-dracarys
> install-app-deps

Installing app dependencies for arch x64 to /Users/tim/git/blackbeard/xxx-dracarys/build


Error output:
Error: /Users/tim/.nvm/versions/node/v4.5.0/bin/node exited with code 1
Output:

> @ postinstall /Users/tim/git/blackbeard/xxx-dracarys
> install-app-deps

Installing app dependencies for arch x64 to /Users/tim/git/blackbeard/xxx-dracarys/build


Error output:
Error: /Users/tim/.nvm/versions/node/v4.5.0/bin/node exited with code 1
Output:

> @ postinstall /Users/tim/git/blackbeard/xxx-dracarys
> install-app-deps

Installing app dependencies for arch x64 to /Users/tim/git/blackbeard/xxx-dracarys/build


Error output:
Error: /Users/tim/.nvm/versions/node/v4.5.0/bin/node exited with code 1
Output:

> @ postinstall /Users/tim/git/blackbeard/xxx-dracarys
> install-app-deps

Installing app dependencies for arch x64 to /Users/tim/git/blackbeard/xxx-dracarys/build


Error output:
Error: /Users/tim/.nvm/versions/node/v4.5.0/bin/node exited with code 1
Output:

> @ postinstall /Users/tim/git/blackbeard/xxx-dracarys
> install-app-deps

Installing app dependencies for arch x64 to /Users/tim/git/blackbeard/xxx-dracarys/build


Error output:
Error: /Users/tim/.nvm/versions/node/v4.5.0/bin/node exited with code 1
Output:

> @ postinstall /Users/tim/git/blackbeard/xxx-dracarys
> install-app-deps

Installing app dependencies for arch x64 to /Users/tim/git/blackbeard/xxx-dracarys/build


Error output:
Error: /Users/tim/.nvm/versions/node/v4.5.0/bin/node exited with code 1
Output:

> @ postinstall /Users/tim/git/blackbeard/xxx-dracarys
> install-app-deps

Installing app dependencies for arch x64 to /Users/tim/git/blackbeard/xxx-dracarys/build


Error output:
Error: /Users/tim/.nvm/versions/node/v4.5.0/bin/node exited with code 1
Output:

> @ postinstall /Users/tim/git/blackbeard/xxx-dracarys
> install-app-deps

Installing app dependencies for arch x64 to /Users/tim/git/blackbeard/xxx-dracarys/build


Error output:
Error: /Users/tim/.nvm/versions/node/v4.5.0/bin/node exited with code 1
Output:

> @ postinstall /Users/tim/git/blackbeard/xxx-dracarys
> install-app-deps

Installing app dependencies for arch x64 to /Users/tim/git/blackbeard/xxx-dracarys/build


Error output:
Error: /Users/tim/.nvm/versions/node/v4.5.0/bin/node exited with code 1
Output:

> @ postinstall /Users/tim/git/blackbeard/xxx-dracarys
> install-app-deps

Installing app dependencies for arch x64 to /Users/tim/git/blackbeard/xxx-dracarys/build


Error output:
Error: /Users/tim/.nvm/versions/node/v4.5.0/bin/node exited with code 1
Output:

> @ postinstall /Users/tim/git/blackbeard/xxx-dracarys
> install-app-deps

Installing app dependencies for arch x64 to /Users/tim/git/blackbeard/xxx-dracarys/build


Error output:
Error: /Users/tim/.nvm/versions/node/v4.5.0/bin/node exited with code 1
Output:

> @ postinstall /Users/tim/git/blackbeard/xxx-dracarys
> install-app-deps

Installing app dependencies for arch x64 to /Users/tim/git/blackbeard/xxx-dracarys/build


Error output:
Error: /Users/tim/.nvm/versions/node/v4.5.0/bin/node exited with code 1
Output:

> @ postinstall /Users/tim/git/blackbeard/xxx-dracarys
> install-app-deps

Installing app dependencies for arch x64 to /Users/tim/git/blackbeard/xxx-dracarys/build


Error output:
Error: /Users/tim/.nvm/versions/node/v4.5.0/bin/node exited with code 1
Output:

> @ postinstall /Users/tim/git/blackbeard/xxx-dracarys
> install-app-deps

Installing app dependencies for arch x64 to /Users/tim/git/blackbeard/xxx-dracarys/build


Error output:
Error: /Users/tim/.nvm/versions/node/v4.5.0/bin/node exited with code 1
Output:

> @ postinstall /Users/tim/git/blackbeard/xxx-dracarys
> install-app-deps

Installing app dependencies for arch x64 to /Users/tim/git/blackbeard/xxx-dracarys/build


Error output:
Error: /Users/tim/.nvm/versions/node/v4.5.0/bin/node exited with code 1
Output:

> @ postinstall /Users/tim/git/blackbeard/xxx-dracarys
> install-app-deps

Installing app dependencies for arch x64 to /Users/tim/git/blackbeard/xxx-dracarys
npm ERR! Darwin 15.6.0
npm ERR! argv "/Users/tim/.nvm/versions/node/v4.5.0/bin/node" "/Users/tim/.nvm/versions/node/v4.5.0/lib/node_modules/npm/bin/npm-cli.js" "install" "--production" "--build-from-source" "--cache-min" "999999999"
npm ERR! node v4.5.0
npm ERR! npm  v2.15.9
npm ERR! code ELIFECYCLE
npm ERR! @ postinstall: `install-app-deps`
npm ERR! Exit status 255
npm ERR!
npm ERR! Failed at the @ postinstall script 'install-app-deps'.
npm ERR! This is most likely a problem with the  package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     install-app-deps
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!
npm ERR!     npm owner ls
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     /Users/tim/git/blackbeard/xxx-dracarys/build/npm-debug.log

    at ChildProcess.<anonymous> (/Users/tim/git/blackbeard/xxx-dracarys/node_modules/electron-builder/src/util/util.ts:154:14)
    at ChildProcess.g (events.js:260:16)
    at emitTwo (events.js:87:13)
    at ChildProcess.emit (events.js:172:7)
    at maybeClose (internal/child_process.js:829:16)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:211:5)
From previous event:
    at spawn (/Users/tim/git/blackbeard/xxx-dracarys/node_modules/electron-builder/src/util/util.ts:117:9)
    at spawnNpmProduction (/Users/tim/git/blackbeard/xxx-dracarys/node_modules/electron-builder/src/util/util.ts:46:9)
    at Object.installDependencies (/Users/tim/git/blackbeard/xxx-dracarys/node_modules/electron-builder/src/util/util.ts:20:122)
    at /Users/tim/git/blackbeard/xxx-dracarys/node_modules/electron-builder/src/install-app-deps.ts:34:2
    at next (native)
From previous event:
    at tsAwaiter (/Users/tim/git/blackbeard/xxx-dracarys/node_modules/electron-builder/src/util/awaiter.ts:10:47)
    at main (/Users/tim/git/blackbeard/xxx-dracarys/node_modules/electron-builder/src/install-app-deps.ts:23:3)
    at Object.<anonymous> (/Users/tim/git/blackbeard/xxx-dracarys/node_modules/electron-builder/src/install-app-deps.ts:37:28)
    at Module._compile (module.js:409:26)
    at Object.Module._extensions..js (module.js:416:10)
    at Module.load (module.js:343:32)
    at Function.Module._load (module.js:300:12)
    at Function.Module.runMain (module.js:441:10)
    at startup (node.js:139:18)
    at node.js:974:3

npm ERR! Darwin 15.6.0
npm ERR! argv "/Users/tim/.nvm/versions/node/v4.5.0/bin/node" "/Users/tim/.nvm/versions/node/v4.5.0/bin/npm" "install"
npm ERR! node v4.5.0
npm ERR! npm  v2.15.9
npm ERR! code ELIFECYCLE
npm ERR! @ postinstall: `install-app-deps`
npm ERR! Exit status 255
npm ERR!
npm ERR! Failed at the @ postinstall script 'install-app-deps'.
npm ERR! This is most likely a problem with the  package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     install-app-deps
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!
npm ERR!     npm owner ls
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     /Users/tim/git/blackbeard/xxx-dracarys/npm-debug.log

More info:

npm-debug.log.txt

question

All 19 comments

When using the build/node_modules folder from a colleague it works because it doesn't install any modules. This is the contents that work:

build.zip

If he has an empty build folder and runs npm install in the root folder he has the same error.
Perhaps a package that electron-builder uses is updated that causes this error? I noticed electron-builder uses ^ in the package.json which perhaps could cause this.

It seems you have custom app dir, could you please post your project package.json?

Here it is:

{
  "repository": "https://github.com/xxx/xxx",
    "licence": "UNLICENSED",
    "private": "private",
  "build": {
    "appId": "com.xxx.xxx",
    "category": "public.app-category.productivity",
    "extraResources": "xxx-resources",
    "mac": {
      "icon": "resources/osx/icon.icns"
    },
    "win": {
      "target": [
        "squirrel"
      ],
      "msi": true,
      "icon": "resources/windows/icon.ico"
    }
  },
  "directories": {
    "buildResources": "resources",
    "app": "build"
  },
  "devDependencies": {
    "chai": "3.5.0",
    "electron-builder": "6.7.3",
    "electron-mocha": "3.1.0",
    "electron-prebuilt": "1.3.6",
    "fs-jetpack": "0.9.2",
    "gulp": "3.9.1",
    "gulp-batch": "1.0.5",
    "gulp-less": "3.1.0",
    "gulp-plumber": "1.1.0",
    "gulp-replace": "0.5.4",
    "gulp-watch": "4.3.9",
    "run-sequence": "1.2.2",
    "semver": "5.3.0",
    "yargs": "5.0.0"
  },
  "scripts": {
    "postinstall": "install-app-deps",
    "build": "gulp build",
    "precreate-installer": "cd app && npm install && cd .. && npm install ",
    "create-installer": "gulp create-installer",
    "start": "gulp start",
    "pretest": "gulp build --env=test",
    "test": "electron-mocha build --renderer"
  }
}

Could you please try to remove both node_modules directories (project and app) and try to use node 6 && npm 3?

I just tried it:

$ nvm use 6.5
Now using node v6.5.0 (npm v3.10.3)
$ rm -rf build node_modules app/node_modules
$ mkdir build
$ npm install
npm WARN deprecated [email protected]: cross-spawn no longer requires a build toolchain, use it instead!
npm WARN deprecated [email protected]: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
npm WARN deprecated [email protected]: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
npm WARN deprecated [email protected]: lodash@<3.0.0 is no longer maintained. Upgrade to lodash@^4.0.0.
npm WARN deprecated [email protected]: graceful-fs v3.0.0 and before will fail on node releases >= v7.0. Please update to graceful-fs@^4.0.0 as soon as possible. Use 'npm ls graceful-fs' to find it in the tree.
npm WARN prefer global [email protected] should be installed with -g

> [email protected] install /Users/tim/git/blackbeard/xxx-xxx/node_modules/fs-xattr
> node-gyp rebuild

gyp WARN download NVM_NODEJS_ORG_MIRROR is deprecated and will be removed in node-gyp v4, please use NODEJS_ORG_MIRROR
gyp WARN download NVM_NODEJS_ORG_MIRROR is deprecated and will be removed in node-gyp v4, please use NODEJS_ORG_MIRROR
gyp WARN download NVM_NODEJS_ORG_MIRROR is deprecated and will be removed in node-gyp v4, please use NODEJS_ORG_MIRROR
  CXX(target) Release/obj.target/xattr/src/async.o
  CXX(target) Release/obj.target/xattr/src/error.o
  CXX(target) Release/obj.target/xattr/src/sync.o
  CXX(target) Release/obj.target/xattr/src/util.o
  CXX(target) Release/obj.target/xattr/src/xattr.o
  SOLINK_MODULE(target) Release/xattr.node

> [email protected] install /Users/tim/git/blackbeard/xxx-xxx/node_modules/fsevents
> node-pre-gyp install --fallback-to-build

[fsevents] Success: "/Users/tim/git/blackbeard/xxx-xxx/node_modules/fsevents/lib/binding/Release/node-v48-darwin-x64/fse.node" is installed via remote

> [email protected] install /Users/tim/git/blackbeard/xxx-xxx/node_modules/macos-alias
> node-gyp rebuild

gyp WARN download NVM_NODEJS_ORG_MIRROR is deprecated and will be removed in node-gyp v4, please use NODEJS_ORG_MIRROR
gyp WARN download NVM_NODEJS_ORG_MIRROR is deprecated and will be removed in node-gyp v4, please use NODEJS_ORG_MIRROR
gyp WARN download NVM_NODEJS_ORG_MIRROR is deprecated and will be removed in node-gyp v4, please use NODEJS_ORG_MIRROR
  CXX(target) Release/obj.target/volume/src/volume.o
  SOLINK_MODULE(target) Release/volume.node

> [email protected] postinstall /Users/tim/git/blackbeard/xxx-xxx/node_modules/electron-prebuilt
> node install.js


> undefined postinstall /Users/tim/git/blackbeard/xxx-xxx
> install-app-deps

Installing app dependencies for arch x64 to /Users/tim/git/blackbeard/xxx-xxx/build

Error: /Users/tim/.nvm/versions/node/v6.5.0/bin/node exited with code 1
Output:

> undefined postinstall /Users/tim/git/blackbeard/gynzy-dracarys
> install-app-deps

Installing app dependencies for arch x64 to /Users/tim/git/blackbeard/gynzy-dracarys/build


Error output:
Error: /Users/tim/.nvm/versions/node/v6.5.0/bin/node exited with code 1
Output:

> undefined postinstall /Users/tim/git/blackbeard/gynzy-dracarys
> install-app-deps

Installing app dependencies for arch x64 to /Users/tim/git/blackbeard/gynzy-dracarys/build


Error output:
Error: /Users/tim/.nvm/versions/node/v6.5.0/bin/node exited with code 1
Output:

> undefined postinstall /Users/tim/git/blackbeard/gynzy-dracarys
> install-app-deps

Installing app dependencies for arch x64 to /Users/tim/git/blackbeard/gynzy-dracarys/build


Error output:
Error: /Users/tim/.nvm/versions/node/v6.5.0/bin/node exited with code 1
Output:

> undefined postinstall /Users/tim/git/blackbeard/gynzy-dracarys
> install-app-deps

Installing app dependencies for arch x64 to /Users/tim/git/blackbeard/gynzy-dracarys/build


Error output:
Error: /Users/tim/.nvm/versions/node/v6.5.0/bin/node exited with code 1
Output:

> undefined postinstall /Users/tim/git/blackbeard/gynzy-dracarys
> install-app-deps

Installing app dependencies for arch x64 to /Users/tim/git/blackbeard/gynzy-dracarys/build


Error output:
Error: /Users/tim/.nvm/versions/node/v6.5.0/bin/node exited with code 1
Output:

> undefined postinstall /Users/tim/git/blackbeard/gynzy-dracarys
> install-app-deps

Installing app dependencies for arch x64 to /Users/tim/git/blackbeard/gynzy-dracarys/build


Error output:
Error: /Users/tim/.nvm/versions/node/v6.5.0/bin/node exited with code 1
Output:

> undefined postinstall /Users/tim/git/blackbeard/gynzy-dracarys
> install-app-deps

Installing app dependencies for arch x64 to /Users/tim/git/blackbeard/gynzy-dracarys/build


Error output:
Error: /Users/tim/.nvm/versions/node/v6.5.0/bin/node exited with code 1
Output:

> undefined postinstall /Users/tim/git/blackbeard/gynzy-dracarys
> install-app-deps

Installing app dependencies for arch x64 to /Users/tim/git/blackbeard/gynzy-dracarys/build


Error output:
Error: /Users/tim/.nvm/versions/node/v6.5.0/bin/node exited with code 1
Output:

> undefined postinstall /Users/tim/git/blackbeard/gynzy-dracarys
> install-app-deps

Installing app dependencies for arch x64 to /Users/tim/git/blackbeard/gynzy-dracarys/build


Error output:
Error: /Users/tim/.nvm/versions/node/v6.5.0/bin/node exited with code 1
Output:

> undefined postinstall /Users/tim/git/blackbeard/gynzy-dracarys
> install-app-deps

Installing app dependencies for arch x64 to /Users/tim/git/blackbeard/gynzy-dracarys/build


Error output:
Error: /Users/tim/.nvm/versions/node/v6.5.0/bin/node exited with code 1
Output:

> undefined postinstall /Users/tim/git/blackbeard/gynzy-dracarys
> install-app-deps

Installing app dependencies for arch x64 to /Users/tim/git/blackbeard/gynzy-dracarys/build


Error output:
Error: /Users/tim/.nvm/versions/node/v6.5.0/bin/node exited with code 1
Output:

> undefined postinstall /Users/tim/git/blackbeard/gynzy-dracarys
> install-app-deps

Installing app dependencies for arch x64 to /Users/tim/git/blackbeard/gynzy-dracarys/build


Error output:
Error: /Users/tim/.nvm/versions/node/v6.5.0/bin/node exited with code 1
Output:

> undefined postinstall /Users/tim/git/blackbeard/gynzy-dracarys
> install-app-deps

Installing app dependencies for arch x64 to /Users/tim/git/blackbeard/gynzy-dracarys/build


Error output:
Error: /Users/tim/.nvm/versions/node/v6.5.0/bin/node exited with code 1
Output:

> undefined postinstall /Users/tim/git/blackbeard/gynzy-dracarys
> install-app-deps

Installing app dependencies for arch x64 to /Users/tim/git/blackbeard/gynzy-dracarys/build


Error output:
Error: /Users/tim/.nvm/versions/node/v6.5.0/bin/node exited with code 1
Output:

> undefined postinstall /Users/tim/git/blackbeard/gynzy-dracarys
> install-app-deps

Installing app dependencies for arch x64 to /Users/tim/git/blackbeard/gynzy-dracarys/build


Error output:
Error: /Users/tim/.nvm/versions/node/v6.5.0/bin/node exited with code 1
Output:

> undefined postinstall /Users/tim/git/blackbeard/gynzy-dracarys
> install-app-deps

Installing app dependencies for arch x64 to /Users/tim/git/blackbeard/gynzy-dracarys/build


Error output:
Error: /Users/tim/.nvm/versions/node/v6.5.0/bin/node exited with code 1
Output:

> undefined postinstall /Users/tim/git/blackbeard/gynzy-dracarys
> install-app-deps

Installing app dependencies for arch x64 to /Users/tim/git/blackbeard/gynzy-dracarys/build


Error output:
Error: /Users/tim/.nvm/versions/node/v6.5.0/bin/node exited with code 1
Output:

> undefined postinstall /Users/tim/git/blackbeard/gynzy-dracarys
> install-app-deps

Installing app dependencies for arch x64 to /Users/tim/git/blackbeard/gynzy-dracarys/build


Error output:
Error: /Users/tim/.nvm/versions/node/v6.5.0/bin/node exited with code 1
Output:

> undefined postinstall /Users/tim/git/blackbeard/gynzy-dracarys
> install-app-deps

Installing app dependencies for arch x64 to /Users/tim/git/blackbeard/gynzy-dracarys/build


Error output:
Error: /Users/tim/.nvm/versions/node/v6.5.0/bin/node exited with code 1
Output:

> undefined postinstall /Users/tim/git/blackbeard/gynzy-dracarys
> install-app-deps

Installing app dependencies for arch x64 to /Users/tim/git/blackbeard/gynzy-dracarys/build


Error output:
Error: /Users/tim/.nvm/versions/node/v6.5.0/bin/node exited with code 1
Output:

> undefined postinstall /Users/tim/git/blackbeard/gynzy-dracarys
> install-app-deps

Installing app dependencies for arch x64 to /Users/tim/git/blackbeard/gynzy-dracarys/build


Error output:
Error: /Users/tim/.nvm/versions/node/v6.5.0/bin/node exited with code 1
Output:

> undefined postinstall /Users/tim/git/blackbeard/gynzy-dracarys
> install-app-deps

Installing app dependencies for arch x64 to /Users/tim/git/blackbeard/gynzy-dracarys/build


Error output:
Error: /Users/tim/.nvm/versions/node/v6.5.0/bin/node exited with code 1
Output:

> undefined postinstall /Users/tim/git/blackbeard/gynzy-dracarys
> install-app-deps

Installing app dependencies for arch x64 to /Users/tim/git/blackbeard/gynzy-dracarys/build


Error output:
Error: /Users/tim/.nvm/versions/node/v6.5.0/bin/node exited with code 1
Output:

> undefined postinstall /Users/tim/git/blackbeard/gynzy-dracarys
> install-app-deps

Installing app dependencies for arch x64 to /Users/tim/git/blackbeard/gynzy-dracarys/build


Error output:
Error: /Users/tim/.nvm/versions/node/v6.5.0/bin/node exited with code 1
Output:

> undefined postinstall /Users/tim/git/blackbeard/gynzy-dracarys
> install-app-deps

Installing app dependencies for arch x64 to /Users/tim/git/blackbeard/gynzy-dracarys/build


Error output:
Error: /Users/tim/.nvm/versions/node/v6.5.0/bin/node exited with code 1
Output:

> undefined postinstall /Users/tim/git/blackbeard/gynzy-dracarys
> install-app-deps

Installing app dependencies for arch x64 to /Users/tim/git/blackbeard/gynzy-dracarys/build


Error output:
Error: /Users/tim/.nvm/versions/node/v6.5.0/bin/node exited with code 1
Output:

> undefined postinstall /Users/tim/git/blackbeard/gynzy-dracarys
> install-app-deps

Installing app dependencies for arch x64 to /Users/tim/git/blackbeard/gynzy-dracarys/build


Error output:
Error: /Users/tim/.nvm/versions/node/v6.5.0/bin/node exited with code 1
Output:

> undefined postinstall /Users/tim/git/blackbeard/gynzy-dracarys
> install-app-deps

Installing app dependencies for arch x64 to /Users/tim/git/blackbeard/gynzy-dracarys/build


Error output:
Error: /Users/tim/.nvm/versions/node/v6.5.0/bin/node exited with code 1
Output:

> undefined postinstall /Users/tim/git/blackbeard/gynzy-dracarys
> install-app-deps

Installing app dependencies for arch x64 to /Users/tim/git/blackbeard/gynzy-dracarys/build


Error output:
Error: /Users/tim/.nvm/versions/node/v6.5.0/bin/node exited with code 1
Output:

> undefined postinstall /Users/tim/git/blackbeard/gynzy-dracarys
> install-app-deps

Installing app dependencies for arch x64 to /Users/tim/git/blackbeard/gynzy-dracarys/build


Error output:
Error: /Users/tim/.nvm/versions/node/v6.5.0/bin/node exited with code 1
Output:

> undefined postinstall /Users/tim/git/blackbeard/gynzy-dracarys
> install-app-deps

Installing app dependencies for arch x64 to /Users/tim/git/blackbeard/gynzy-dracarys/build


Error output:
Er
npm WARN optional Skipping failed optional dependency /7zip-bin/7zip-bin-win:
npm WARN notsup Not compatible with your operating system or architecture: [email protected]
npm WARN optional Skipping failed optional dependency /7zip-bin/7zip-bin-linux:
npm WARN notsup Not compatible with your operating system or architecture: [email protected]
npm ERR! Darwin 15.6.0
npm ERR! argv "/Users/tim/.nvm/versions/node/v6.5.0/bin/node" "/Users/tim/.nvm/versions/node/v6.5.0/lib/node_modules/npm/bin/npm-cli.js" "install" "--production" "--build-from-source" "--cache-min" "999999999"
npm ERR! node v6.5.0
npm ERR! npm  v3.10.3
npm ERR! code ELIFECYCLE
npm ERR! undefined postinstall: `install-app-deps`
npm ERR! Exit status 255
npm ERR!
npm ERR! Failed at the undefined postinstall script 'install-app-deps'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the  package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     install-app-deps
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     /Users/tim/git/blackbeard/gynzy-dracarys/build/npm-debug.log

    at ChildProcess.childProcess.once.code (/Users/tim/git/blackbeard/gynzy-dracarys/node_modules/electron-builder/src/util/util.ts:154:14)
    at ChildProcess.g (events.js:286:16)
    at emitTwo (events.js:106:13)
    at ChildProcess.emit (events.js:191:7)
    at maybeClose (internal/child_process.js:877:16)
    at Socket.<anonymous> (internal/child_process.js:334:11)
    at emitOne (events.js:96:13)
    at Socket.emit (events.js:188:7)
    at Pipe._handle.close [as _onclose] (net.js:493:12)
From previous event:
    at spawn (/Users/tim/git/blackbeard/gynzy-dracarys/node_modules/electron-builder/src/util/util.ts:117:9)
    at spawnNpmProduction (/Users/tim/git/blackbeard/gynzy-dracarys/node_modules/electron-builder/src/util/util.ts:46:9)
    at Object.installDependencies (/Users/tim/git/blackbeard/gynzy-dracarys/node_modules/electron-builder/src/util/util.ts:20:122)
    at /Users/tim/git/blackbeard/gynzy-dracarys/node_modules/electron-builder/src/install-app-deps.ts:34:2
    at next (native)
From previous event:
    at tsAwaiter (/Users/tim/git/blackbeard/gynzy-dracarys/node_modules/electron-builder/src/util/awaiter.ts:10:47)
    at main (/Users/tim/git/blackbeard/gynzy-dracarys/node_modules/electron-builder/src/install-app-deps.ts:23:3)
    at Object.<anonymous> (/Users/tim/git/blackbeard/gynzy-dracarys/node_modules/electron-builder/src/install-app-deps.ts:37:28)
    at Module._compile (module.js:556:32)
    at Object.Module._extensions..js (module.js:565:10)
    at Module.load (module.js:473:32)
    at tryModuleLoad (module.js:432:12)
    at Function.Module._load (module.js:424:3)
    at Module.runMain (module.js:590:10)
    at run (bootstrap_node.js:394:7)
    at startup (bootstrap_node.js:149:9)
    at bootstrap_node.js:509:3

npm WARN optional Skipping failed optional dependency /7zip-bin/7zip-bin-win:
npm WARN notsup Not compatible with your operating system or architecture: [email protected]
npm WARN optional Skipping failed optional dependency /7zip-bin/7zip-bin-linux:
npm WARN notsup Not compatible with your operating system or architecture: [email protected]
npm ERR! Darwin 15.6.0
npm ERR! argv "/Users/tim/.nvm/versions/node/v6.5.0/bin/node" "/Users/tim/.nvm/versions/node/v6.5.0/bin/npm" "install"
npm ERR! node v6.5.0
npm ERR! npm  v3.10.3
npm ERR! code ELIFECYCLE
npm ERR! undefined postinstall: `install-app-deps`
npm ERR! Exit status 255
npm ERR!
npm ERR! Failed at the undefined postinstall script 'install-app-deps'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the  package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     install-app-deps
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     /Users/tim/git/blackbeard/gynzy-dracarys/npm-debug.log

Please ensure that no install-app-deps postinstall task in your application package.json.

is install-app-deps not required after npm install ?

is install-app-deps not required after npm install ?

Only in project package.json, not in app.

It's only in my project package.json, i've removed it and will try to create a installer.

During that task the following line appears (install-app-deps ?)
Rebuilding app dependencies for arch x64 to /Users/tim/git/blackbeard/gynzy-dracarys/build

To ensure your dependencies are always updated based on both files, simply add "postinstall": "install-app-deps" to your development package.json. This will basically automatically trigger an npm install within your app directory so you don't have to do this work everytime you install/update your dependencies.

stated in the readme.

During that task the following line appears (install-app-deps ?)
Rebuilding app dependencies for arch x64 to /Users/tim/git/blackbeard/gynzy-dracarys/build

Called by tool internally, you must not use install-app-deps in your app package.json.

Yes I understand but we dont't use it in the app package.json only in the development package.json. That caused the error. I now removed it because of that error. Will this cause problems?

I now removed it because of that error. Will this cause problems?

You mean that you remove it from development package.json? No, electron-builder will continue to automatically rebuild or install (if no node_modules directory in the app) app dependencies. But npm install from project base dir will not install app deps anymore. Maybe it is ok for you.

Your error is not clear for me — for some reasons there is a cycle and node finally exited. If you can prepare sample project (or send existing), I will try to investigate.

Yes I removed it from the development.json 😃

Can I mail the project so you can investigate?

[email protected] (but I will look not right now, only tomorrow morning (CET)).

That is not a problem, we're able to build right now. Thanks for the quick support 👍

Dropping a line for anybody who hits this issue later-- for me, fixing was as simple as running rm -rf node_modules and then npm install. After that, I was able to build again without getting this error. Hope this helps! Reminds me of my Titanium days when everything and its 3rd cousin could be fixed with a ti clean. Ah, good ole days. 👍

@joshualambert Soon electron-builder will warn if you use npm and recommend to use https://yarnpkg.com (currently, yarn cannot be used, but all major issues are fixed). Because I am tired to recommend rm -rf node_modules.

+1 have this undefined post install reported on win10 and on MacOs Sierra 10.12.3
Also same behaviour take place when I (accidentaly) killed my linux and copied whole project to new installation.

Use yarn.

Was this page helpful?
0 / 5 - 0 ratings