graphql-request icon indicating copy to clipboard operation
graphql-request copied to clipboard

graphql/printer not found

Open amirHosseinKhademii opened this issue 4 years ago • 2 comments

when i compile my react app in typescript superset im getting an error saying that in graphql-request node nodules graphql/printer not found

amirHosseinKhademii avatar Dec 19 '20 17:12 amirHosseinKhademii

I got this problem as well. After doing npm install --save-dev graphql the problem went away, at least for development build.

EliasHjelm avatar Dec 29 '20 08:12 EliasHjelm

https://github.com/prisma-labs/graphql-request/blob/2c60842a84de120735661f71db827ec3c54ac962/package.json#L50-L52 https://github.com/prisma-labs/graphql-request/blob/2c60842a84de120735661f71db827ec3c54ac962/src/index.ts#L2

graphql is a peerDependency, and used in the source code. You have to install it as well.

@EliasHjelm The peerDependency is needed on runtime, not a development-only purpose. You should npm install --save graphql, not npm install --save-dev graphql.

jjangga0214 avatar Jun 22 '21 02:06 jjangga0214