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

electron-forge make error #282

Closed
chenzhiguo opened this issue Jul 31, 2017 · 4 comments
Closed

electron-forge make error #282

chenzhiguo opened this issue Jul 31, 2017 · 4 comments

Comments

@chenzhiguo
Copy link

Please describe your issue:
Run command electron-forge make error!

Console output when you run electron-forge with the environment variable DEBUG=electron-forge:*. (Instructions on how to do so here). Please include the stack trace if one exists.

➜  demoVue git:(master) ✗ electron-forge make
✔ Checking your system
✔ Resolving Forge Config
We need to package your application before we can make it
✔ Preparing to Package Application for arch: x64
✔ Compiling Application
⠋ Preparing native dependenciesYou are using the depreceated electron-rebuild API, please switch to using the options object instead
✔ Preparing native dependencies
⠧ Packaging Application
An unhandled rejection has occurred inside Forge:
Command failed: npm prune --production
npm WARN demovue@1.0.0 No repository field.

npm ERR! May not delete: /private/var/folders/dq/n8trt1yn3374vbfd712pwsfm0000gn/T/electron-packager/darwin-x64/demovue-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/Silence/.npm/_logs/2017-07-31T07_53_55_001Z-debug.log

Error: Command failed: npm prune --production
npm WARN demovue@1.0.0 No repository field.

npm ERR! May not delete: /private/var/folders/dq/n8trt1yn3374vbfd712pwsfm0000gn/T/electron-packager/darwin-x64/demovue-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/Silence/.npm/_logs/2017-07-31T07_53_55_001Z-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:921:16)
    at Socket.stream.socket.on (internal/child_process.js:348:11)
    at emitOne (events.js:115:13)
    at Socket.emit (events.js:210:7)
    at Pipe._handle.close [as _onclose] (net.js:549:12)

Project description
It is a new project demo that I use electron-forge init ... create it.
Then, I want to package it without write any code in it.
Error comming...

@MarshallOfSound
Copy link
Member

@chenzhiguo npm@5 has issues like these (this is an npm bug)

Please downgrade your version of npm to npm@3 to avoid these bugs. See #269

@chenzhiguo
Copy link
Author

oh, my god. Is there any other solution? If I do not want to reduce the npm version.

@MarshallOfSound
Copy link
Member

@chenzhiguo There are a few options here

@ambroiseRabier
Copy link

ambroiseRabier commented Oct 30, 2018

Had added "electron": "^3.0.6", into my package.json manually, since Jetbrain IDE Webstorm was proposing me to do it. Turn out this make packaging fail with error :

An unhandled rejection has occurred inside Forge:
Command failed: npm prune --production
module.js:549
    throw err;
    ^

Error: Cannot find module 'debug'

I think electron is installed by forge, in node_modules, but you shouldn't list it in package.json.
Just remove the line in package.json and it worked for me.

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

No branches or pull requests

3 participants