nx-labs icon indicating copy to clipboard operation
nx-labs copied to clipboard

@nrwl/expo on start graphql error

Open AlonBH opened this issue 3 years ago • 5 comments

Hey, I ran the following commands:

  • npx create-nx-workspace resell --preset=empty
  • selected yes on nx cloud
  • npm install @nrwl/expo --save-dev When 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. (/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`

AlonBH avatar Jun 30 '22 14:06 AlonBH

Same

trevordilley avatar Jun 30 '22 20:06 trevordilley

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?

michal-wrzosek avatar Jul 07 '22 18:07 michal-wrzosek

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 avatar Jul 09 '22 09:07 leggomuhgreggo

Actually is this a duplicate of this issue #69?

leggomuhgreggo avatar Jul 09 '22 09:07 leggomuhgreggo

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.

bombillazo avatar Jul 20 '22 05:07 bombillazo