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

Share code between expo and deno #51

Open
chmac opened this issue Nov 20, 2024 · 2 comments
Open

Share code between expo and deno #51

chmac opened this issue Nov 20, 2024 · 2 comments
Assignees

Comments

@chmac
Copy link
Member

chmac commented Nov 20, 2024

We have some code in nr-common and I think we can import it from nr-server but I can't import it from nr-app. There are all kinds of errors, some of which I thought I'd fixed in 99fd596 but it turns out, I haven't.

Goals:

  • Typescript code in nr-common
  • We should be able to use packages in nr-common (eg zod)
  • Code should be usable from the expo app (nr-app)
  • Code should be usable for deno (and probably from node)

Nice to have:

  • Code should be imported without a build step
    • Using workspaces, you typically need to run pnpm i or similar after every change in nr-common which creates unexpected weirdness because changes don't immediately propagate
  • TypeScript should be imported rather than *.js and *.d.ts
chmac added a commit that referenced this issue Nov 23, 2024
@chmac
Copy link
Member Author

chmac commented Nov 23, 2024

This has turned to be wildly difficult. I ended up copying nr-common into nr-server and even then there were still problems. Some of the issues I can remember:

  • When we built the docker container for nr-server all the files in nr-common are outside of it's docker root and so they're not available in the container
  • The dependencies in nr-common are not available in nr-server, so deno complains it can't find zod

@chmac
Copy link
Member Author

chmac commented Nov 25, 2024

Further issues where @babel/runtime is missing in nr-common which linked to this issue comment which is why I installed it into nr-common and fixed that error.

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

2 participants