electron-builder: install-app-deps not found
- Version: 18.3.5 (latest)
- Target: Windows
A fresh npm i won’t succeed:
Der Befehl “install-app-deps” ist entweder falsch geschrieben oder konnte nicht gefunden werden.
Which translates to “command install-app-deps couldn’t be found”.
Log output:
3980 info lifecycle xyz@0.10.4~install: xyz@0.10.4
3981 silly lifecycle xyz@0.10.4~install: no script for install, continuing
3982 silly postinstall xyz@0.10.4
3983 info lifecycle xyz@0.10.4~postinstall: xyz@0.10.4
3984 verbose lifecycle xyz@0.10.4~postinstall: unsafe-perm in lifecycle true
3985 verbose lifecycle xyz@0.10.4~postinstall: PATH: xxx
3986 verbose lifecycle xyz@0.10.4~postinstall: CWD: E:\xyz
3987 silly lifecycle xyz@0.10.4~postinstall: Args: [ '/d /s /c', 'install-app-deps' ]
3988 silly lifecycle xyz@0.10.4~postinstall: Returned: code: 1 signal: null
3989 info lifecycle xyz@0.10.4~postinstall: Failed to exec postinstall script
3990 verbose stack Error: xyz@0.10.4 postinstall: `install-app-deps`
3990 verbose stack Exit status 1
3990 verbose stack at EventEmitter.<anonymous> (C:\Program Files\nodejs\node_modules\npm\lib\utils\lifecycle.js:283:16)
3990 verbose stack at emitTwo (events.js:125:13)
3990 verbose stack at EventEmitter.emit (events.js:213:7)
3990 verbose stack at ChildProcess.<anonymous> (C:\Program Files\nodejs\node_modules\npm\lib\utils\spawn.js:40:14)
3990 verbose stack at emitTwo (events.js:125:13)
3990 verbose stack at ChildProcess.emit (events.js:213:7)
3990 verbose stack at maybeClose (internal/child_process.js:887:16)
3990 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:208:5)
3991 verbose pkgid xyz@0.10.4
3992 verbose cwd E:\xyz
3993 verbose Windows_NT 10.0.15063
3994 verbose argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "i"
3995 verbose node v8.0.0
3996 verbose npm v5.0.0
3997 error code ELIFECYCLE
3998 error errno 1
3999 error xyz@0.10.4 postinstall: `install-app-deps`
3999 error Exit status 1
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Comments: 16 (14 by maintainers)
if you execute
npm dedupeafterinstalland get different size, it means that WTF… it is why yarn is recommended for Electron apps, where deps tree must be in the ideal form always. It is just shame that install doesn’t produce ideal tree and explicit dedupe/prune is required.I am tired to recommend users to remove node modules. It is like Windows reboot. I am tired to think in case of any error that cache clearing will help me. Especially on CI. I am tired to make npm working in the docker with various fs implementations.
I am tired to wait until npm wil install/update. I am tired to type in npm run task, instead of yarn task (no run). I am tired to fix issues on different machines — npm 5 has lock file also, but yarn is better (see last post in the yarn blog).
I am tired to run npm prune and dedupe.
In addition, you should use yarn for electron apps because yarn automatically clean and reduce size of node modules. Your node modules always in the ideal tree (https://twitter.com/bestander_nz/status/833696202436784128).
@Lange Please use yarn instead of npm.