nx-labs
nx-labs copied to clipboard
@nrwl/expo on start graphql error
Hey, I ran the following commands:
npx create-nx-workspace resell --preset=empty- selected yes on nx cloud
npm install @nrwl/expo --save-devWhen running npx nx run resell I'm getting the following error: `> nx run resell-app:start
Packager is ready at http://localhost:8081
┌─────────────────────────────────────────────────────────────────────────┐
│ │
│ There is a new version of expo-cli available (5.4.12). │
│ You are currently using expo-cli 5.4.11 │
│ Install expo-cli globally using the package manager of your choice; │
│ for example: npm install -g expo-cli to get the latest version │
│ │
└─────────────────────────────────────────────────────────────────────────┘
Starting project at /Users/alonbenhaim/Projects/resell/apps/resell-app
Body must be a string. Received: undefined.
Error: Body must be a string. Received: undefined.
at devAssert (/Users/alonbenhaim/Projects/resell/node_modules/graphql/jsutils/devAssert.js:12:11)
at new Source (/Users/alonbenhaim/Projects/resell/node_modules/graphql/language/source.js:37:56)
at new Parser (/Users/alonbenhaim/Projects/resell/node_modules/graphql/language/parser.js:86:62)
at Object.parse (/Users/alonbenhaim/Projects/resell/node_modules/graphql/language/parser.js:30:16)
at Object.
Same
It seems that currently, this issue blocks the possibility to generate a new expo app in nx workspace. I can't seem to find a solution for that. Anyone?
Probably something similar to this issue
I rolled my React dependencies back to 17, because that's what expo ~~is pinned to~~ was until yesterday (unreleased)
Might also be a graphql version mismatch as described here
You can check the dependency chain with one of these commands
npm ls graphql
yarn why graphql
Actually is this a duplicate of this issue #69?
Yes, this is a duplicate of #69, which is due to @nrwl/expo installing both the eas-cli and expo-cli (the latter against the recommendation of the expo team), each bringing their own version of graphql to the dependencies.
I tried making a PR to update the dependency and it got shut down. It would be better if @nrwl/expo did not force you to install these clis as it brings major headaches to monorepos using graphql.