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

Problems downloading electron #180

Closed
thanpolas opened this issue Feb 25, 2016 · 10 comments · Fixed by #256 · May be fixed by qcif/data-curator#563
Closed

Problems downloading electron #180

thanpolas opened this issue Feb 25, 2016 · 10 comments · Fixed by #256 · May be fixed by qcif/data-curator#563
Assignees
Labels

Comments

@thanpolas
Copy link

Hello, just installed 2.8.3 and trying to create a build...

When i run npm run pack I get this error:

[19:08:54] $ npm run pack

> [email protected] pack /Users/thanpolas/Projects/work/insightReplay/reveal-electron
> build

Skipping app dependencies installation because dev and app dependencies are not separated
Downloading electron-v.36.7-darwin-x64.zip
Error: GET https://github.com/atom/electron/releases/download/v.36.7/electron-v.36.7-darwin-x64.zip returned 404
Error: Compound error:

Error #1 --------------------------------------------------------------------------------
undefined

Error #2 --------------------------------------------------------------------------------
TypeError: A value null was yielded that could not be treated as a promise

    See http://goo.gl/MqrFmX

From coroutine:
    at Function.Promise.coroutine (/Users/thanpolas/Projects/work/insightReplay/reveal-electron/node_modules/electron-builder/node_modules/bluebird/js/release/generators.js:175:17)
    at tsAwaiter (/Users/thanpolas/Projects/work/insightReplay/reveal-electron/node_modules/electron-builder/src/awaiter.ts:4:35)

As you can notice it tries to download:

https://github.com/atom/electron/releases/download/v.36.7/electron-v.36.7-darwin-x64.zip

when it should be downloading:

https://github.com/atom/electron/releases/download/v0.36.7/electron-v0.36.7-darwin-x64.zip

Another issue I have is with the "postinstall": "install-app-deps", script... it fails after npm install, when i run it directly from node_modules/.bin/install-app-deps i get:

Installing app dependencies for arch x64 to /Users/thanpolas/Projects/work/insightReplay/reveal-electron/app
Error: spawn npm ENOENT
    at exports._errnoException (util.js:856:11)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:178:32)
    at onErrorNT (internal/child_process.js:344:16)
    at doNTCallback2 (node.js:452:9)
    at process._tickCallback (node.js:366:17)

I use nvm

@develar
Copy link
Member

develar commented Feb 25, 2016

Please specify "electron-prebuilt": "^0.36.7" in the development package.json. I suppose, it is specified as 0.36.7 now. Please change it to ^0.36.7

@develar develar added the bug label Feb 25, 2016
@develar develar self-assigned this Feb 25, 2016
@develar
Copy link
Member

develar commented Feb 25, 2016

Another issue I have is with the "postinstall": "install-app-dept"

You don't need this because you don't use two-package.json project layout. Remove postinstall from your package.json (or consider to use suggested layout).

@thanpolas
Copy link
Author

Please specify "electron-prebuilt": "^0.36.7" in the development package.json. I suppose, it is specified as 0.36.7 now. Please change it to ^0.36.7

Yes, that solved my problem (!).

You don't need this because you don't use two-package.json project layout. Remove postinstall from your package.json (or consider to use suggested layout).

Ok removed, as a newcomer i'm having a hard time wrapping my head around the flow, readme doesn't help...

I need to run the builder on a stripped down version of the current app, how would i go about doint that?

Thank you for the fast response @develar!

@develar
Copy link
Member

develar commented Feb 25, 2016

I need to run the builder on a stripped down version of the current app, how would i go about doint that?

Don't quite understand. Do you mean that packaged app (.app osx or .exe win) processed by 3rd party tool and you want to build only installer?

@develar
Copy link
Member

develar commented Feb 25, 2016

Yes, that solved my problem (!).

It is a bug, will be fixed.

@thanpolas
Copy link
Author

Don't quite understand. Do you mean that packaged app (.app osx or .exe win) processed by 3rd party tool and you want to build only installer?

I need to remove all dev deps from node_modules using npm prune --development on a copy of the app... and cleanup test folders and the like... Is there a way to use the output of electron-packager to just generate the installers (.dmg) based on that bundle vs running the packager in the builder?

There are a few packager options that I cannot understand how to pass to the builder like prune and asar

@thanpolas
Copy link
Author

There are a few packager options that I cannot understand how to pass to the builder like prune and asar

ok figured this out, missed the line where the "build" key in package.json is used for that purpose.

@develar
Copy link
Member

develar commented Feb 25, 2016

@thanpolas

asar

asar is used by default. JFYI: See step 1 This object will be used as a source of electron-packager options. You can specify any other options here.

I need to remove all dev deps from node_modules using npm prune --development on a copy of the app...

Don't try to solve inexistent issue. Don't waste your time. See two-package.json project layout.

@havenchyk
Copy link
Contributor

@thanpolas @develar electron-packager supports ignore option, where you can provide a regex to match the packages you wouldn't like to add to the asar. But I like the idea of two-package.json layout, it makes sense.

@develar
Copy link
Member

develar commented Feb 25, 2016

@havenchyk It is exactly what I mean — "it will be constant battle". It is nightmare. Just use two-package.son layout and forget about it.

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