electron / packager

Customize and package your Electron app with OS-specific bundles (.app, .exe, etc.) via JS or CLI
https://npm.im/@electron/packager
BSD 2-Clause "Simplified" License
173 stars 17 forks source link

Problem with electron-db and packaging #947

Closed rheza closed 5 years ago

rheza commented 5 years ago

Please describe your issue: Hi,

Seems pretty basic, but I can't get around to package my electron app. I successfully pack and launch the app, but i got this error. So my application not usable.

Uncaught Error: ENOENT: no such file or directory, open 'package.json' at Object.openSync (fs.js:436) at Object.module.(anonymous function) [as openSync] (ELECTRON_ASAR.js:160:31) at Object.readFileSync (fs.js:341) at Object.fs.readFileSync (ELECTRON_ASAR.js:580) at Object.<anonymous> (/Users/rheza/Desktop…tron-db/index.js:14) at Object.<anonymous> (/Users/rheza/Desktop…ron-db/index.js:438) at Module._compile (internal/modules/cjs/loader.js:693) at Object.Module._extensions..js (internal/modules/cjs/loader.js:704) at Module.load (internal/modules/cjs/loader.js:602) at tryModuleLoad (internal/modules/cjs/loader.js:541)

my package.json file { "name": "Grin", "version": "1.0.0", "description": "Wallet", "main": "main.js", "build": { "appId": "com.rheza.test", "mac": { "category": "Finance" } }, "repository": "https://github.com/electron/electron-quick-start", "keywords": [ "Electron", "quick", "start", "tutorial", "demo" ], "author": "Rheza Pahlevi", "license": "CC0-1.0", "scripts": { "start": "electron ." }, "dependencies": { "app-root-dir": "^1.0.2", "electron-db": "^0.8.3", "electron-reload": "^1.4.0" }, "devDependencies": { "electron": "^4.0.5", "electron-builder": "latest" } } Anyone can give me insight how to successfully pack my app please,

Thanks

welcome[bot] commented 5 years ago

👋 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.

tonton-pixel commented 5 years ago

Your package.jsonfile appears to make reference to "electron-builder", not "electron-packager". You'll probably get more appropriate answers by opening an issue in the relevant electron-userland/electron-builder repository, although the error message you're getting ('package.json' not found ?) may suggest a problem at a different level...

malept commented 5 years ago

Since this issue refers to electron-builder and not Electron Packager, I'm closing this. The previous comment is correct about more appropriate support.