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

Error: Invariant failed: Browser history needs a DOM #51

Open
ekkis opened this issue Apr 6, 2020 · 1 comment
Open

Error: Invariant failed: Browser history needs a DOM #51

ekkis opened this issue Apr 6, 2020 · 1 comment

Comments

@ekkis
Copy link

ekkis commented Apr 6, 2020

I'm getting this error when I import ./shim.js as the first line in my component. I'm not sure why that file has the last line commented out:

// require('crypto')

but I've uncommented it since that's actually what I'm installing this package for. any idea why I'm getting this and how to fix it?

in fact, it's the uncommenting of that line that causes the problem

@ekkis
Copy link
Author

ekkis commented Apr 6, 2020

one other thing, I notice the comments in that file state:

// If using the crypto shim, uncomment the following line to ensure
// crypto is loaded first, so it can populate global.crypto

if using the crypto shim? what does that mean? is there some other thing I need to do? all I want is for crypto.getRandomValues to become defined so that react-native-randombytes can do its thing

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