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

update to 0.7.4 breaks Electron/PouchDB/LevelDB #574

Closed
NNemec opened this issue Dec 31, 2016 · 4 comments · Fixed by #575
Closed

update to 0.7.4 breaks Electron/PouchDB/LevelDB #574

NNemec opened this issue Dec 31, 2016 · 4 comments · Fixed by #575

Comments

@NNemec
Copy link

NNemec commented Dec 31, 2016

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) []

@JiaLiPassion
Copy link
Collaborator

JiaLiPassion commented Jan 1, 2017

@NNemec , Thank you for reporting the bug, I will make a PR to fix it.

@bdunn44
Copy link

bdunn44 commented Jan 2, 2017

+1 for this issue, it breaks bcrypt as well. I personally can't downgrade to 0.6 due to #508, which breaks socket.io (ws)...

@JiaLiPassion
Copy link
Collaborator

@bdunn44, could you please provide a repo or plunker to reproduce your issue? I am not sure my PR #575 fix your issue or not.

@bdunn44
Copy link

bdunn44 commented Jan 3, 2017

I spent some time trying to reproduce the issue in a fresh project and was unable to...

A simple re-installation of bcrypt resolved the issue for me. False alarm!

mhevery pushed a commit that referenced this issue Jan 12, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants