nx-labs
nx-labs copied to clipboard
Installing Expo CLI locally conflicts with GraphQL version of NestJS
Love this package, I've been waiting forever for a cleaner integration of expo into my nx project.
One issue I've run into is that this package installs expo-cli locally, and expo-cli has a dependency on graphql 0.13. This causes a problem if you want to use graphql>0.13 elsewhere in your project, (e.g. if your backend nestjs application makes use of the @nestjs/graphql package which requires >^15.8.0 || ^16.0.0).
In this case you run into an issue where you cannot get expo and the nestjs app to run at the same time.
Expo's documentation states that expo is intended to be installed globally.
As a workaround I removed "expo-cli" from the dependencies list in package.json
and instead added:
"scripts": {
...
"postinstall": "npm link expo-cli"
}
This allows me to install my desired version of the graphql package without impacting the functioning of expo-cli.
While I like the simplicity of having this package install expo-cli locally, I think for broader compatibility it may be preferable to require users to have it installed globally.
i think it is about the third-party library expo-cli. once expo-cli got updated, hopefully, this issue will be resolved.
Hey @danimbrogno , I made a PR in the expo-cli repo to see if we get this moving: https://github.com/expo/expo-cli/pull/4447
I'm having issues as well when trying to use graphql
in my project:
Duplicate "graphql" modules cannot be used at the same time since different
versions may have different capabilities and behavior.
But I agree, while it's great that nx/expo
tries to bring the expo-cli as a dependency, it is breaking projects that use graphql
at the moment.