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: Unable to resolve module crypto (React Native) #647

Closed
Darapsas opened this issue Sep 22, 2021 · 3 comments · Fixed by #648 or #676
Closed

Error: Unable to resolve module crypto (React Native) #647

Darapsas opened this issue Sep 22, 2021 · 3 comments · Fixed by #648 or #676
Labels
released triage me I really want to be triaged. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns.

Comments

@Darapsas
Copy link
Contributor

Darapsas commented Sep 22, 2021

After upgrading from "@googlemaps/google-maps-services-js": "3.1.16" -> "@googlemaps/google-maps-services-js": "3.2.0" started getting this error:
20210922_170844

Using "react-native": "0.65.1".

Tried this, but it didn't help, other solutions involve deprecated packages and for that reason, I won't try them, for now downgrading to 3.1.16 works just fine for me.

@Darapsas Darapsas added triage me I really want to be triaged. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns. labels Sep 22, 2021
@Darapsas Darapsas changed the title Error: Unable to resolve module crypto Error: Unable to resolve module crypto (React Native) Sep 22, 2021
@googlemaps-bot
Copy link
Contributor

🎉 This issue has been resolved in version 3.2.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

@jpoehnelt
Copy link
Contributor

@Darapsas let me know if this works for you!

@Darapsas
Copy link
Contributor Author

Tried 3.2.2 today, but no luck:
20210923_172617
Looking a bit deeper, the crypto package is empty with a deprecation warning:
20210923_173056
Tried rn-nodeify workaround with the latest 3.2.2, seems to be working (didn't test it that much, but at least the application starts without errors). Of course, this is a very hacky way, I will try to look for a cleaner solution if it exists, but it will suffice for now.

It would be really cool to see this package use crypto-js instead of the core node module - crypto, for all the people who use google-maps-services-js with client applications (like react-native or other web-applications). All things considered I am pretty sure this is not going to happen, but at least you could add this workaround to the documentation for others to see.

@jpoehnelt jpoehnelt removed their assignment Jun 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
released triage me I really want to be triaged. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns.
Projects
None yet
3 participants