feathers-plus / generator-feathers-plus

A Yeoman generator to (re)generate a FeathersJS application supporting both REST and GraphQL architectural concepts and their query languages.
https://generator.feathers-plus.com/
Other
44 stars 30 forks source link

TypeError: graphql.getIntrospectionQuery is not a function #282

Closed dobeerman closed 4 years ago

dobeerman commented 4 years ago

Steps to reproduce

Just followed this page: https://generator.feathers-plus.com/get-started/ and then had executed

$ feathers-plus generate graphql

Expected behavior

App should start

Actual behavior

App crashed with the following output:

[nodemon] starting `ts-node --files --typeCheck src/index.ts`

/home/my_home/dev/my_project/server/node_modules/src/stitch/introspectSchema.ts:15
const parsedIntrospectionQuery: DocumentNode = parse(getIntrospectionQuery());
                                                     ^
TypeError: graphql.getIntrospectionQuery is not a function
    at Object.<anonymous> (/home/my_home/dev/my_project/server/node_modules/src/stitch/introspectSchema.ts:15:54)
    at Module._compile (internal/modules/cjs/loader.js:776:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:787:10)
    at Module.load (internal/modules/cjs/loader.js:653:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
    at Function.Module._load (internal/modules/cjs/loader.js:585:3)
    at Module.require (internal/modules/cjs/loader.js:690:17)
    at require (internal/modules/cjs/helpers.js:25:18)
    at Object.<anonymous> (/home/my_home/dev/my_project/server/node_modules/@graphql-toolkit/common/index.cjs.js:27:22)
    at Module._compile (internal/modules/cjs/loader.js:776:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:787:10)
    at Module.load (internal/modules/cjs/loader.js:653:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
    at Function.Module._load (internal/modules/cjs/loader.js:585:3)
    at Module.require (internal/modules/cjs/loader.js:690:17)
    at require (internal/modules/cjs/helpers.js:25:18)
[nodemon] app crashed - waiting for file changes before starting...

System configuration

{
  "name": "server",
  "description": "Project server",
  "version": "0.0.0",
  "homepage": "",
  "main": "src",
  "keywords": [
    "feathers"
  ],
  "contributors": [],
  "bugs": {},
  "directories": {
    "lib": "src",
    "test": "test/"
  },
  "engines": {
    "node": "^10.0.0",
    "yarn": ">= 0.18.0"
  },
  "scripts": {
    "test": "yarn run tslint && npm run mocha",
    "test:all": "yarn run tslint && cross-env NODE_ENV=test npm run mocha",
    "tslint": "tslint -p tsconfig.json -c tslint.json && tslint -p tsconfig.test.json -c tslint.json",
    "dev": "nodemon src/index.ts",
    "dev:seed": "nodemon src/index.ts --seed",
    "start": "ts-node --files src/",
    "start:seed": "cross-env NODE_ENV=test ts-node --files src/ --seed",
    "mocha": "ts-mocha -p tsconfig.test.json \"test/**/*.test.ts\" --timeout 10000 --exit",
    "compile": "tsc -p tsconfig.json"
  },
  "dependencies": {
    "@feathers-plus/graphql": "^1.10.0",
    "@feathers-plus/test-utils": "^0.3.5",
    "@feathersjs/authentication": "^2.1.7",
    "@feathersjs/authentication-jwt": "^2.0.1",
    "@feathersjs/authentication-local": "^1.2.1",
    "@feathersjs/authentication-oauth2": "^1.1.0",
    "@feathersjs/configuration": "^2.0.0",
    "@feathersjs/errors": "^3.3.0",
    "@feathersjs/express": "^1.2.3",
    "@feathersjs/feathers": "^3.1.7",
    "@feathersjs/socketio": "^3.2.2",
    "ajv": "5.5.2",
    "compression": "^1.7.3",
    "cors": "^2.8.4",
    "cross-env": "^7.0.2",
    "feathers-hooks-common": "^4.16.3",
    "feathers-mongoose": "^6.1.4",
    "graphql-resolvers-ast": "^1.4.0",
    "helmet": "^3.13.0",
    "lodash.merge": "^4.6.1",
    "merge-graphql-schemas": "^1.5.3",
    "mongodb-core": "^3.2.7",
    "mongoose": "^5.2.7",
    "passport-facebook": "^2.1.1",
    "passport-google-oauth20": "^1.0.0",
    "serve-favicon": "^2.5.0",
    "winston": "^3.0.0"
  },
  "devDependencies": {
    "@types/compression": "^0.0.36",
    "@types/cors": "^2.8.4",
    "@types/feathersjs__authentication": "^2.1.1",
    "@types/feathersjs__authentication-jwt": "^1.0.3",
    "@types/feathersjs__authentication-local": "^1.0.2",
    "@types/feathersjs__authentication-oauth2": "^1.0.3",
    "@types/feathersjs__configuration": "^1.0.1",
    "@types/feathersjs__errors": "^3.2.1",
    "@types/feathersjs__express": "^1.1.4",
    "@types/feathersjs__feathers": "^3.0.4",
    "@types/feathersjs__socketio": "^3.0.3",
    "@types/graphql": "^0.13.4",
    "@types/helmet": "^0.0.40",
    "@types/lodash.merge": "^4.6.4",
    "@types/mocha": "^5.2.5",
    "@types/mongoose": "^5.2.11",
    "@types/passport-facebook": "^2.1.8",
    "@types/request-promise": "^4.1.42",
    "@types/serve-favicon": "^2.2.30",
    "mocha": "^5.2.0",
    "nodemon": "^1.18.7",
    "request": "^2.88.0",
    "request-promise": "^4.2.2",
    "ts-mocha": "^2.0.0",
    "ts-node": "^7.0.1",
    "tslint": "^5.11.0",
    "typescript": "^3.0.3"
  }
}
$ node --version
v10.16.0

Operating System:

Distributor ID: Ubuntu
Description:    Ubuntu 19.10
Release:    19.10
Codename:   eoan