profile
viewpoint

Ask questions Cannot find module 'graphql/utilities/schemaPrinter

build error:

nest build

node_modules/type-graphql/dist/utils/buildSchema.d.ts:2:47 - error TS2307: Cannot find module 'graphql/utilities/schemaPrinter'.

2 import { Options as PrintSchemaOptions } from "graphql/utilities/schemaPrinter"; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ node_modules/type-graphql/dist/utils/emitSchemaDefinitionFile.d.ts:2:47 - error TS2307: Cannot find module 'graphql/utilities/schemaPrinter'.

2 import { Options as PrintSchemaOptions } from "graphql/utilities/schemaPrinter"; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

package.json

{ "name": "nest-lambda", "version": "0.0.1", "description": "", "author": "", "private": true, "license": "UNLICENSED", "scripts": { "prebuild": "rimraf dist", "build": "nest build", "format": "prettier --write "src//*.ts" "test//.ts"", "start": "nest start", "start:dev": "nest start --watch", "start:debug": "nest start --debug --watch", "start:prod": "node dist/main", "lint": "eslint "{src,apps,libs,test}/**/.ts" --fix", "test": "jest", "test:watch": "jest --watch", "test:cov": "jest --coverage", "test:debug": "node --inspect-brk -r tsconfig-paths/register -r ts-node/register node_modules/.bin/jest --runInBand", "test:e2e": "jest --config ./test/jest-e2e.json" }, "dependencies": { "@nestjs/common": "^7.0.0", "@nestjs/core": "^7.0.0", "@nestjs/graphql": "^7.2.4", "@nestjs/mongoose": "^6.4.0", "@nestjs/platform-express": "^7.0.0", "apollo-server-express": "^2.12.0", "aws-lambda": "^1.0.5", "aws-sdk": "^2.656.0", "aws-serverless-express": "^3.3.8", "graphql": "^15.0.0", "graphql-tools": "^5.0.0", "mongoose": "^5.9.9", "reflect-metadata": "^0.1.13", "rimraf": "^3.0.2", "rxjs": "^6.5.4", "type-graphql": "^0.17.6" }, "devDependencies": { "@nestjs/cli": "^7.0.0", "@nestjs/schematics": "^7.0.0", "@nestjs/testing": "^7.0.0", "@types/jest": "25.1.4", "@types/supertest": "^2.0.8", "@typescript-eslint/eslint-plugin": "^2.28.0", "@typescript-eslint/parser": "^2.28.0", "eslint": "^6.8.0", "eslint-config-prettier": "^6.10.0", "eslint-plugin-import": "^2.20.1", "jest": "^25.1.0", "prettier": "^1.19.1", "supertest": "^4.0.2", "ts-jest": "25.2.1", "ts-loader": "^6.2.1", "ts-node": "^8.6.2", "tsconfig-paths": "^3.9.0", "typescript": "^3.7.4" }, "jest": { "moduleFileExtensions": [ "js", "json", "ts" ], "rootDir": "src", "testRegex": ".spec.ts$", "transform": { "^.+\.(t|j)s$": "ts-jest" }, "coverageDirectory": "../coverage", "testEnvironment": "node" } }

MichalLytek/type-graphql

Answer questions MichalLytek

Please check your peer deps. TypeGraphQL does not work with GraphQL 15 yet - see #594.

useful!
source:https://uonfu.com/
answerer
Michał Lytek MichalLytek @bluereceipt1 Poland https://typegraphql.com/ Full-stack developer with a tendency to perfectionism. GraphQL and TypeScript evangelist, Node.js and React enthusiast. Author of the TypeGraphQL framework.
Github User Rank List