Skip to content
This repository was archived by the owner on Feb 26, 2024. It is now read-only.
This repository was archived by the owner on Feb 26, 2024. It is now read-only.

update to 0.7.4 breaks Electron/PouchDB/LevelDB #574

@NNemec

Description

@NNemec

It took me close to one day to identify zone.js 0.7 as the root cause for this problem and identify a downgrade to 0.6 as possible workaround. I very much hope that someone can pick this up from here and fix the issue so that no one else has to go through the same experience:

To reproduce:

  1. clone, build and run the demo from https://github.com/nolanlawson/hello-electron-with-pouchdb as documents
    -> npm install, npm start, to this point everything should work fine (all four database connections work)

  2. include zone.js version 0.6.26 into the project:
    a) add '"zone.js": "0.6.26" to dependencies in package.json
    b) add '<script src="node_modules/zone.js/dist/zone.js"></script>' to in index.hml
    -> npm install, npm start, everything should still work fine

  3. update zone.js to 0.7.4:
    -> npm install, npm start, now you get "Error for LevelDB"

(when removing the .catch statement, I can obtain the actual error message as:

Error: Could not locate the bindings file. Tried:
→ /Users/norbert/repo/hello-electron-with-pouchdb/build/leveldown.node
→ /Users/norbert/repo/hello-electron-with-pouchdb/build/Debug/leveldown.node
→ /Users/norbert/repo/hello-electron-with-pouchdb/build/Release/leveldown.node
→ /Users/norbert/repo/hello-electron-with-pouchdb/out/Debug/leveldown.node
→ /Users/norbert/repo/hello-electron-with-pouchdb/Debug/leveldown.node
→ /Users/norbert/repo/hello-electron-with-pouchdb/out/Release/leveldown.node
→ /Users/norbert/repo/hello-electron-with-pouchdb/Release/leveldown.node
→ /Users/norbert/repo/hello-electron-with-pouchdb/build/default/leveldown.node
→ /Users/norbert/repo/hello-electron-with-pouchdb/compiled/6.5.0/darwin/x64/leveldown.node: unable to import leveldown
at new Error (native)
at requireLeveldown (/Users/norbert/repo/hello-electron-with-pouchdb/node_modules/pouchdb/lib/index.js:5112:12) []
at PouchDB.LevelDownPouch (/Users/norbert/repo/hello-electron-with-pouchdb/node_modules/pouchdb/lib/index.js:5312:17) []
at new PouchDB (/Users/norbert/repo/hello-electron-with-pouchdb/node_modules/pouchdb/lib/index.js:2701:34) []

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions