apollo-tooling icon indicating copy to clipboard operation
apollo-tooling copied to clipboard

confilct with graphql v 15 in ./node_modules/graphql and v 14 in ./node_modules/apollo-language-server/node_modules/graphql

Open alesak opened this issue 4 years ago • 5 comments

our package.json has dependency for

"graphql": "^15.5.0" "apollo": "*"

which installs in version 14.7.0 in ./node_modules/apollo-language-server/node_modules/graphql and version 15.5.2 in ./node_modules/graphql

cousing conflict when using npx apollo codegen:generate

"Cannot use GraphQLScalarType "ID" from another module or realm."

deleting ./node_modules/apollo-language-server/node_modules/graphql folder fixes the issue

I am wondering why is there different version when graphql is already installed in node_modules/graphql

alesak avatar Sep 04 '21 14:09 alesak

+1 having the same issue

carmelid avatar Sep 06 '21 08:09 carmelid

+1

mchambaud avatar Sep 08 '21 17:09 mchambaud

I've added a (temporary) postinstall script to get around this bug. https://github.com/apollographql/apollo-tooling/issues/2415#issuecomment-930173053

cblaettl avatar Sep 29 '21 13:09 cblaettl

@cblaettl Thanks. As you said, by adding the postinstall script to my package.json file, I could solve the problem.

alfie1104 avatar Nov 11 '21 07:11 alfie1104

+1

formatlos avatar Nov 24 '21 14:11 formatlos