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

Unable to resolve "js-base64" from "..." in Expo Web SDK 49 #171

Open
pachun opened this issue Sep 6, 2023 · 2 comments
Open

Unable to resolve "js-base64" from "..." in Expo Web SDK 49 #171

pachun opened this issue Sep 6, 2023 · 2 comments

Comments

@pachun
Copy link

pachun commented Sep 6, 2023

I had an issue in which adding this dependency to a project worked fine as I TDD'd through jest tests but then when I bundled the project for web with metro using yarn web, I received the following in the terminal:

Web Bundling failed 615ms
Unable to resolve "js-base64" from "src/components/MessageIframe/index.tsx"

I found the solution, after some time. I'm posting here only for posterity - or if we feel it's important enough, I will PR the readme.

  1. Create a metro config file with npx expo customize metro.config.js as described here
  2. Add the line config.resolver.sourceExts.push("mjs") as described here

I know it's not directly the fault of this library, but running into this problem had me lose time trying a bunch of other less well-maintained base64 libraries, before finally coming back to this one and finding a solution for my use case.

Please feel free to close this if it's cluttering issues.

@christiansaiki
Copy link

Thanks @pachun !! Saved me from hours of debugging

@arjunyel
Copy link
Contributor

arjunyel commented May 6, 2024

May be fixed by this #172

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

3 participants