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-db does not work when packaged #981

Closed
dipeshparashar opened this issue Apr 18, 2019 · 6 comments
Closed

electron-db does not work when packaged #981

dipeshparashar opened this issue Apr 18, 2019 · 6 comments
Labels
invalid ❌ Not related to Electron Packager directly

Comments

@dipeshparashar
Copy link

dipeshparashar commented Apr 18, 2019

Preflight Checklist

  • [x ] I have read the contribution documentation for this project.
  • [x ] I agree to follow the code of conduct that this project follows, as appropriate.
  • [x ] I have searched the issue tracker for a bug that matches the one I want to file, without success.

Issue Details

  • Electron Packager Version:
    • 13.1.1
  • Electron Version:
    • 4.1.4
  • Operating System:
    • win32 (x64)
  • Last Known Working Electron Packager version::

Expected Behavior

After Packaging, the app should open as it does while development. Or the electron-packager should warn/throw error in case anything is not appropriate.

Actual Behavior

The app packager successfully but gives an ENOENT error on opening it.

To Reproduce

I have tried a flat file structure (main, package, index all in parent folder). And also recommended file structure (src/main, index) . After the app is written is the specified folder. On opening the Application file, an error is shown - ENOENT : no such file or directory. open 'package.json'

Additional Information

The details of all the package.json and cli are as follows -

packJson

And the detailed error is -

App Error electron packager

@welcome
Copy link

welcome bot commented Apr 18, 2019

👋 Thanks for opening your first issue here! If you have a question about using Electron Packager, read the support docs. If you're reporting a 🐞 bug, please make sure you include steps to reproduce it. Development and issue triage is community-driven, so please be patient and we will get back to you as soon as we can.

To help make it easier for us to investigate your issue, please follow the contributing guidelines.

@malept malept added the needs info Issue reporter needs to provide more information for maintainers to take action label Apr 18, 2019
@malept
Copy link
Member

malept commented Apr 18, 2019

In order to debug your problem further, we need a minimal testcase to reproduce your problem. Using the electron-quick-start repository as a base, could you please create a minimal Electron app that illustrates the issue you described, and post a link to it here?

@malept malept changed the title ENOENT Error : On Packaging For Win32 Arch64 Cannot find package.json when running packaged win32/x64 app Apr 18, 2019
@dipeshparashar
Copy link
Author

@malept , Thanks for the suggestion. Here is the basic project with all specified dependencies : BasicProject , I also tried adding asar explicitly based on the comments here , but it did not help. I look forward to your review.

@no-response no-response bot removed the needs info Issue reporter needs to provide more information for maintainers to take action label Apr 18, 2019
@malept malept added needs info Issue reporter needs to provide more information for maintainers to take action invalid ❌ Not related to Electron Packager directly and removed bug 🐛 needs info Issue reporter needs to provide more information for maintainers to take action labels Apr 18, 2019
@malept malept changed the title Cannot find package.json when running packaged win32/x64 app electron-db does not work when packaged Apr 18, 2019
@malept
Copy link
Member

malept commented Apr 18, 2019

Unfortunately, what you provided is quite a bit more than a minimal Electron app. I work on this in my free time, and I can't allocate any time to debugging your app to figure out what's wrong with it.

I suspect what's happening is that electron-db does not work when packaged.

Since this is not a bug with Electron Packager (but rather electron-db), I'm closing this issue.

@malept malept closed this as completed Apr 18, 2019
@dipeshparashar
Copy link
Author

dipeshparashar commented Apr 19, 2019

@malept : I kept some bit in this version to test all dependencies which are called atleast once for a complete test. But yes, my bad on adding the node modules in the zip and i do respect your time. I was making a better minimal version again. And while doing it, i considered your suggestion on Electron-DB. And the good news is you are correct. The app is packaged and works perfectly without it.

@malept 👍 - The bug is indeed because of Electron-DB .

This debugging has taken many days and the project many weeks which started with electron-db as a core requirement. The only similar replacement to Electron-DB which i can find now is NeDB, but it seem to have similar issues.

Is there any suggestion for a simple DB for electron ?

@malept
Copy link
Member

malept commented Apr 19, 2019

Is there any suggestion for a simple DB for electron ?

I would suggest asking in one of the community forums. There aren't that many people watching this issue tracker.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
invalid ❌ Not related to Electron Packager directly
Projects
None yet
Development

No branches or pull requests

2 participants