electron-packager encounters error during prune with npm 5.3.0
See original GitHub issue- I have read the contribution documentation for this project.
- I agree to follow the code of conduct that this project follows, as appropriate.
- I have searched the issue tracker for an issue that matches the one I want to file, without success.
Please describe your issue:
Console output when you run electron-packager. Please include the stack trace if one exists.
Encountered error while building
{ Error: Command failed: npm prune --production
npm ERR! May not delete: /private/var/folders/v1/901xmbvx413g7vfw031f7f300000gp/T/electron-packager/darwin-x64/myapp-darwin-x64/Electron.app/Contents/Resources/app/node_modules/.bin
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/igerges/.npm/_logs/2017-07-18T20_54_00_332Z-debug.log
at ChildProcess.exithandler (child_process.js:270:12)
at emitTwo (events.js:125:13)
at ChildProcess.emit (events.js:213:7)
at maybeClose (internal/child_process.js:897:16)
at Socket.stream.socket.on (internal/child_process.js:340:11)
at emitOne (events.js:115:13)
at Socket.emit (events.js:210:7)
at Pipe._handle.close [as _onclose] (net.js:548:12)
killed: false,
code: 1,
signal: null,
cmd: 'npm prune --production' }
What command line arguments are you passing? Alternatively, if you are using the API, what
parameters are you passing to the packager()
function?
{
prune: true
}
Please provide either a failing minimal testcase (with a link to the code) or detailed steps to reproduce your problem. Using electron-quick-start is a good starting point.
App build consistently fails with the above error after
npm install -g npm
but works consistently if downgraded to
npm install -g npm@5.2.0
Issue Analytics
- State:
- Created 6 years ago
- Reactions:3
- Comments:12 (5 by maintainers)
Top Results From Across the Web
Electron command failed: npm prune --production
I am on Angular 2. NPM version is: 5.3.0. My package.json is below: { "productName": "invoice", "version" ...
Read more >'electron' is not recognized as an internal or external ...
Whenever I run npm run watch, it gives me this error => electron' is not recognized as an internal or external command, operable...
Read more >electron-packager - npm
Package your electron app in OS executables (.app, .exe, etc) via JS or CLI. Supports building Windows, Linux or Mac executables. formerly known ......
Read more >electron-updater | Yarn - Package Manager
Fast, reliable, and secure dependency management.
Read more >Command Line - Cypress Documentation
You may find it easier to add the cypress command to the scripts object in your package.json file and call it from an...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
For ease of others landing here, this was fixed in npm 5.4.0 so just update your npm with:
And you should be good to go.
A workaround is to set
packageManager: false
in the Packager API, or--no-package-manager
with the Packager CLI.