Closed garygcchiu closed 4 months ago
For others that may run into this issue, as inspired by the repo above, their workaround/solution is to not use this plugin altogether, and specify simdjson
as an extraPods
in the expo-build-properties
plugin: [Code]
[
"expo-build-properties",
{
ios: {
extraPods: [
{
name: "simdjson",
configurations: ["Debug", "Release"],
path: "../../../node_modules/@nozbe/simdjson",
modular_headers: true,
},
],
},
},
],
]
However, I feel like this plugin solves other issues, and would be ideal if we can use this plugin.
Note: this is not a blocker and the workaround/alternative above works. As I understand it, simdjson
is the only native library that is required, looking at WatermelonDB's docs.
@garygcchiu Thanks for your feedback. I'll check first chance if we can have this as an option to the plugin for easier configuration.
I wonder how wmdb works in this production app that is using turborepo 🤔
this production app
I think it just adds 'extra pods' for ios, without using the plugin. On Android part, I don't think it enables JSI interface (not thoroughly checked though)
I created a PR to add monorepo support https://github.com/morrowdigital/watermelondb-expo-plugin/pull/37
I created a PR to add monorepo support #37
It is now in beta.
yarn add @morrowdigital/watermelondb-expo-plugin@beta
to install and test it.
thanks @clmoreno
This fix is now public in 2.3.2
I have my project structure in a typical monorepo structure like the following:
repo/
apps/
expo/
app/
assets/
.gitignore
app.config.ts
app-env.d.ts
babel.config.js
eas.json
index.js
metro.config.js
package.json
...
packages/
app/
db/
lib/
package.json
tsconfig.json
...
I believe the paths to dependencies are hardcoded to be in
../node_modules/
: https://github.com/morrowdigital/watermelondb-expo-plugin/blob/main/src/withWatermelon.ts#L250-L252This would lead to the following issue during the build, since in a Yarn monorepo workspace, dependencies are hoisted higher together in the hierarchy and this error would occur locally and via EAS Build (with or without dev client enabled):
Failed build from EAS:
I think some people would like to develop in a monorepo structure, an example here using WatermelonDB + Expo + monorepo: [ShareMyStack]
Is there a way to specify the path for the workspace root, (i.e.
../../
instead of./
)? Or a way to pass the paths to the dependencies another way?Thank you!