Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Follow-up to (PouchDB / LevelDB / LevelDown): MaxListenersExceededWarning, Error: once called more than once #496

Closed
danielweck opened this issue Jul 30, 2019 · 3 comments

Comments

@danielweck
Copy link
Member

Follow-up to:
#406

According to feedback from other developers on the PouchDB issue tracker (see pouchdb/pouchdb#7819 (comment) and pouchdb/pouchdb#7825 ), this package.json workaround is effective:

 "resolutions": { "leveldown": "5.0.2", "levelup": "4.0.2" },

As you can see, this forces specific versions of LevelDown and LevelUp, instead of what we are doing now: setting a fixed version 7.0.* for pouchdb-adapter-leveldb (we also freeze leveldown to 5.*.*):

https://github.com/readium/readium-desktop/blob/59cf6aff032f50f2d631642edb308bfcd81034aa/package.json#L172
https://github.com/readium/readium-desktop/blob/59cf6aff032f50f2d631642edb308bfcd81034aa/package.json#L263-L264
https://github.com/readium/readium-desktop/blob/59cf6aff032f50f2d631642edb308bfcd81034aa/src/package.json#L36-L37

@danielweck
Copy link
Member Author

For what it's worth, I posted an issue in the LevelDown tracker:
Level/leveldown#686

@danielweck danielweck mentioned this issue Oct 13, 2019
danielweck added a commit that referenced this issue Oct 14, 2019
…code level during NPM install, precompiled binaries of NodeJS plugins were loaded several times (Fixes #496 Also see Level/leveldown#686 )
@danielweck
Copy link
Member Author

danielweck commented Oct 14, 2019

Ah, a better workaround which allows us to use the latest leveldown (^5.3.0):
480dac7
See: Level/leveldown#686 (comment)

Tested successfully on MacOS with:
rm -rf dist && rm -rf node_modules && npm install && npm run __postinstall && npm run start

@danielweck
Copy link
Member Author

Follow-up: the latest leveldown version 5.4.0 does not fix the issue, so we are keeping the workaround for now. See:
3331b92
Level/leveldown#686 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant