nrwl / nx-labs

A collection of Nx plugins
MIT License
144 stars 50 forks source link

@nrwl/expo on start graphql error #81

Open AlonBH opened 2 years ago

AlonBH commented 2 years ago

Hey, I ran the following commands:

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. (/Users/alonbenhaim/Projects/resell/node_modules/graphql-tools/src/stitching/introspectSchema.ts:7:48) at Module._compile (internal/modules/cjs/loader.js:1072:14) at Object.Module._extensions..js (internal/modules/cjs/loader.js:1101:10) at Module.load (internal/modules/cjs/loader.js:937:32) at Function.Module._load (internal/modules/cjs/loader.js:778:12) at Module.require (internal/modules/cjs/loader.js:961:19) 1`

trevordilley commented 2 years ago

Same

michal-wrzosek commented 2 years ago

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?

leggomuhgreggo commented 2 years ago

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
leggomuhgreggo commented 2 years ago

Actually is this a duplicate of this issue #69?

bombillazo commented 2 years ago

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.