-
Notifications
You must be signed in to change notification settings - Fork 83
React-Native issue #72
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
Comments
Got it to work. Had to do the following: In the lib/pouch-utils.js change line 79 from 'var crypto = require('crypto');' to 'var crypto = require('react-native-crypto');' and it works 👍 |
I had the same problem in Angular 7. This helped: Reference Patch |
Faced the same problem. I'm using my fork gstvg/pouchdb-quick-search. To use this, just put on package.json: |
Solution of @gstvg works fine on React Native. |
The https://github.com/pouchdb-community/pouchdb-quick-search/blob/master/lib/pouch-utils.js#L79 Seeing as react-native-crypto is not a perfect drop-in replacement for
My quick fix was replacing the whole code block with a call to the |
Hi
I get the following error when I run the following:
import PouchDB from 'pouchdb-react-native';
PouchDB.plugin(require('pouchdb-find'));
PouchDB.plugin(require('pouchdb-quick-search')); // <= causes the error
Error:
Unable to resolve module
crypto
from/Users/raynoppe/Sites/reactNative/mapped/node_modules/pouchdb-quick-search/lib/pouch-utils.js
: Module does not exist in the module map or in these directories:/Users/raynoppe/Sites/reactNative/mapped/node_modules/pouchdb-quick-search/node_modules
, /Users/raynoppe/Sites/reactNative/mapped/node_modules
I installed crypto via nom and still the same error.
Thank you
The text was updated successfully, but these errors were encountered: