"IO error: /.../app.asar/dist/electron/db/LOCK: Not a directory", -- Electron Build
See original GitHub issueFirst off, there’s a strong chance this is user error, but I’m out of options!
I’m building my Electron app using electron-packager
and my version of electron
is 2.0.5.
When I am running in dev mode, I have no issues with levelup
.
When I run the package scripts, I get the following stack trace:
Uncaught (in promise)
err {type: "OpenError", name: "OpenError", cause: undefined, message: "IO error: /Users/joemccann/Documents/crypto/sterli…s/app.asar/dist/electron/db/LOCK: Not a directory", stack: "OpenError: IO error: /Users/joemccann/Documents/cr…es/abstract-leveldown/abstract-leveldown.js:41:14"}
cause
:
undefined
message
:
"IO error: /Users/joemccann/Documents/crypto/sterling-app/build/Sterling-darwin-x64/Sterling.app/Contents/Resources/app.asar/dist/electron/db/LOCK: Not a directory"
name
:
"OpenError"
stack
:
"OpenError: IO error: /Users/joemccann/Documents/crypto/sterling-app/build/Sterling-darwin-x64/Sterling.app/Contents/Resources/app.asar/dist/electron/db/LOCK: Not a directory↵ at /Users/joemccann/Documents/crypto/sterling-app/build/Sterling-darwin-x64/Sterling.app/Contents/Resources/app.asar/node_modules/levelup/lib/levelup.js:87:23↵ at /Users/joemccann/Documents/crypto/sterling-app/build/Sterling-darwin-x64/Sterling.app/Contents/Resources/app.asar/node_modules/abstract-leveldown/abstract-leveldown.js:41:14↵ at /Users/joemccann/Documents/crypto/sterling-app/build/Sterling-darwin-x64/Sterling.app/Contents/Resources/app.asar/node_modules/deferred-leveldown/deferred-leveldown.js:20:21↵ at /Users/joemccann/Documents/crypto/sterling-app/build/Sterling-darwin-x64/Sterling.app/Contents/Resources/app.asar/node_modules/abstract-leveldown/abstract-leveldown.js:41:14↵ at /Users/joemccann/Documents/crypto/sterling-app/build/Sterling-darwin-x64/Sterling.app/Contents/Resources/app.asar/node_modules/abstract-leveldown/abstract-leveldown.js:41:14"
type
:
"OpenError"
__proto__
:
Error
The package scripts are the defaults set here:
https://github.com/vuetifyjs/electron/blob/master/template/.electron-vue/build.js
If there is more I can post that can be helpful in me tracking down this bug just let me know.
Thanks!
Issue Analytics
- State:
- Created 5 years ago
- Comments:7 (3 by maintainers)
Top Results From Across the Web
Application entry file "build/electron.js" in the "<path>/dist/mac ...
Error : Application entry file "build/electron.js" in the ... found that my preelectron-pack was not executing correctly, thus not creating the build folder....
Read more >Electron build error: file not found in artifact - Stack Overflow
I've created my app using the electron-react-boilerplate, and I am running the package build with the default config. "build": { "productName": ...
Read more >Common Configuration - electron-builder
in the package.json file of your project using the build key on the top level: "build": { "appId": "com.example.app" } · or through...
Read more >Options | electron-packager
Documentation for electron-packager. ... Functions to be called after your app directory has been packaged into an .asar ... This does not disable...
Read more >Building a production electron/create-react-app application ...
Create a new directory “electron” with the file “main.js” inside it. ... this workaround raises another error: window.require is not a ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Found the issue. During the package step I have
asar: true
forelectron-packager
and I have myleveldb
path set to be inside the asar folder, which won’t work.I changed the path for the db to be created outside of the
src
directory and all is well.No worries.
I linked to the webpack build file above.
This is the project:
https://github.com/vuetifyjs/electron/tree/master/template
It’s electron build of vuetify
I’ll try to create a test repo
Thanks!
On Mon, Jul 30, 2018 at 19:18 Lars-Magnus Skog notifications@github.com wrote:
– Sent from Joe in Real Life