question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

"IO error: /.../app.asar/dist/electron/db/LOCK: Not a directory", -- Electron Build

See original GitHub issue

First 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:closed
  • Created 5 years ago
  • Comments:7 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
joemccanncommented, Jul 31, 2018

Found the issue. During the package step I have asar: true for electron-packager and I have my leveldb 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.

1reaction
joemccanncommented, Jul 31, 2018

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:

Sorry, but I still have no idea how this project works or where to start.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/Level/levelup/issues/607#issuecomment-409071622, or mute the thread https://github.com/notifications/unsubscribe-auth/AAC8akpyBXEfZ1fvOsQ1U8nc3k7b63jOks5uL75mgaJpZM4VnXOh .

– Sent from Joe in Real Life

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found