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

Import issue with expo app on 2.x #1155

Open
ctriley opened this issue Jan 14, 2025 · 2 comments
Open

Import issue with expo app on 2.x #1155

ctriley opened this issue Jan 14, 2025 · 2 comments

Comments

@ctriley
Copy link

ctriley commented Jan 14, 2025

It seems that the migration to @bufbuild/protobuf means that when bundling the proto files into an expo application, it crashes.

iOS Bundling failed 10241ms node_modules/expo-router/entry.js (3217 modules)
app:dev: Unable to resolve "@bufbuild/protobuf/wire" from "packages/protos/dist/models/state.js"

I don't really know enough about this stuff to provide much more context. Sorry

@stephenh
Copy link
Owner

Hi @ctriley ! I'm not an expo/RN user, so also don't really know a lot about how/why it would not be working...

I'm kind of surprised b/c afaiu ts-proto and @bufbuild/protobuf should have very "vanilla" package.json setups.

Hm, well, I take that back, the @bufbuild/protobuf package.json has a variety of exports setup:

https://www.npmjs.com/package/@bufbuild/protobuf?activeTab=code

@timostamm have you seen any issues with @bufbuild/protobuf being used from RN/expo apps?

@timostamm
Copy link
Contributor

Expo does not support package exports by default yet, but you can enable support with an option - see the Expo docs here.

the @bufbuild/protobuf package.json has a variety of exports setup

Yeah, it was painful to get there. I highly recommend attw for linting.

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