-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Some node modules not working in application packaged with electron-builder #602
Comments
If you copy Please set |
Well that stopped it from rebuilding node_modules but the notifications still do not appear to be working. I will dig deeper and see what I can find. I was actually looking/hoping for an option that stops the npm rebuild but that option is missing from the "options" documentation so I was not aware of it. |
@Mercieral Please note that |
@develar That did it. I suppose I should have looked at electron's packaging docs a little closer as it details that some node-api's do not work using electron's asar archive, which I was unaware of. Thanks for your help and extremely quick responses! |
For several months I wait user who send me (develar@gmail.com) real project to demonstrate issue — the truth is that electron-builder can and should automatically solves such issues. To avoid explicit If you send me project and it will be possible to reproduce the issue, I will fix it. |
I unfortunately cannot send you the project I am on currently as I am not in control of it and it is a private project. I will however try to create a small public project on my own sometime today that will recreate the issue I am having and send it to you. From what I remember from using the electron-winstaller is that if asar is disabled, then I would get filePathTooLong errors on install or something similar so I would definitely prefer having it enabled if notifications will work. |
https://github.com/Mercieral/Electron-with-notifications Here is a link to a very simple project that recreates it. Thanks unpackDir seems to be working perfectly. Is this bad practice to use this option? https://www.npmjs.com/package/node-notifier#within-electron-packaging Node-notifier is aware of this issue |
Thanks, I cannot promise that I will fix/investigate it today, but this week.
|
Sounds good, On a related note, I am trying to get the squirrel.Windows installer to work but since I am using npm 2, the node_modules folder is too long and it fails the install with a PathTooLongException. So I switched to the newest version of npm (3.10.5) and reinstalled all my dependencies, removed the grunt task that manually copies over the node_modules (because this does is not easy with npm 3's flat structure), and set the npmRebuild to true again but the build just says "Rebuilding app dependencies for arch x64 to /Users/amercier/...../electron_build" and nothing after that and goes straight into the packaging step. My app's package.json that is located in electron_build is as follows,
I'm also getting
in which there is no homepage field in my development package.json... Is it possible this is an issue with setting directories.app to something other than the default? As I set mine to my "electron_build" directory. EDIT: It does something if I have all of the node_modules installed in my electron_build directory, so I believe I am misunderstanding what the npmRebuild does exactly. |
No, |
Hello,
So my building order goes as such (I've gone over this before but it's important). First I grunt build my application into an "electron_build" which also copies over the necessary node_modules and the application's package.json. Then I use electron builder with directories.app set to "electron_build" and directories.buildResources set to "electron/resources" (the only things in this directory are the 2 icons).
My app is using node_notifier to show native desktop notifications.
The notifications work perfectly with electron-prebuilt using "electron ."
The notifications also work perfectly with the .app generated from electron-packager
But the notifications do not work in the .app or the installed app from electron-builder.
I am not sure what is causing this but it seems like electron-builder is reinstalling node-notifier which is not necessary as I already have it included in the app directory and my grunt task makes some important modifications to the node_module.
Any suggestions or thoughts as to why it is working with electron-packager but not electron-builder?
The text was updated successfully, but these errors were encountered: