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-compile support bug #1465

Closed
jessb321 opened this issue Apr 13, 2017 · 15 comments · May be fixed by qcif/data-curator#563
Closed

electron-compile support bug #1465

jessb321 opened this issue Apr 13, 2017 · 15 comments · May be fixed by qcif/data-curator#563
Labels

Comments

@jessb321
Copy link

  • Version: 16.8.3
  • Target: All

So, I'm using electron-compile for development, and would like to use babel for distribution - however, I need to change the entry point for babel - is there any way to do this within electron-builder?

Thanks

@develar
Copy link
Member

develar commented Apr 13, 2017

--em.main=foo.js

@jessb321
Copy link
Author

Ah, that should work! Is there any way to do it with the json config?

@develar
Copy link
Member

develar commented Apr 13, 2017

I'm using electron-compile for development, and would like to use babel for distribution

electron-compile is supported. Don't recommended to use babel officially — please see electron-userland/electron-compile#207 (comment)

@jessb321
Copy link
Author

Ok, when I tried that it gave me an error saying that es6-init.js had not been precompiled? Not sure if thats on my side or not however

@develar
Copy link
Member

develar commented Apr 13, 2017

If you insist — "WHAT? I just want bablel", electron-builder can do something smart for you. But please think twice.

@develar
Copy link
Member

develar commented Apr 13, 2017

Please provide project or sample to reproduce and I will check.

@jessb321
Copy link
Author

Here is the project I am using. I run npm run dist to build NSIS installer.

@develar
Copy link
Member

develar commented Apr 13, 2017

I will check after my working day (10 hours).

@jessb321
Copy link
Author

Ok thanks

@jessb321
Copy link
Author

Actually, I think I've found the reason electron-compile isn't working in built application on my windows box - the cache isn't being populated with built files, rather just compiler-info.json.gz. I tested on my mac box and it worked absolutely fine and actually populated the cache. I also tested making the cache on windows myself, and that actually had the built files in there - however when I ran electron-builder it removed the contents and just left compiler-info.json.gz @develar
image

@jessb321
Copy link
Author

jessb321 commented May 6, 2017

Any update on this @develar ?

@develar
Copy link
Member

develar commented May 7, 2017

Sorry for delay, I will take a look soon.

@jessb321
Copy link
Author

jessb321 commented May 7, 2017

Ok thankyou

@whphhg
Copy link

whphhg commented May 11, 2017

I'm trying to pack https://github.com/whphhg/vcash-electron/blob/22d7124a948cbcd2d99291645c59791b54736ce2/package.json on Linux (tar.gz).

The package.json above is not yet updated to include electron-builder, these are the changes I've made:

  • I've moved electron-compile to dependencies (was in devDependencies)
  • Added pack and dist to scripts ("pack": "build --dir", "dist": "build")
  • Added build: "build": { "appId": "vcash.electron.gui", "linux": { "category": "Network", "target": [ "tar.gz" ] } }

I keep getting the following error when I try to run the binary in dist/linux-unpacked Error: Asked for /home/.../app.asar/initialize.js but it was not precompiled!, which is strange because when I execute npm run pack it looks like it's precompiling the source.

npm run pack
[email protected] pack /home/whphhg/Vcash/electron
build --dir
No native production dependencies
Packaging for linux x64 using electron 1.6.7 to dist/linux-unpacked
Compiling using electron-compile

Edit: I've updated the master with a temporary fix until a proper solution is found, if you're using the source as a test please use it at this point.

@jessb321
Copy link
Author

Sorry to be a bother, but have you found any fix for this? @develar

@develar develar added the bug label Jun 14, 2017
@develar develar changed the title [question] Change main file for distribution electron-compile support bug Jun 14, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants