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

compile error - graphql-language-service-interface/esm/GraphQLLanguageService.js

Open allanmaclean opened this issue 4 years ago • 0 comments

This issue pertains to the following package(s):

  • [ ] GraphQL Playground - Electron App
  • [ ] GraphQL Playground HTML
  • [X ] GraphQL Playground
  • [ ] GraphQL Playground Express Middleware
  • [ ] GraphQL Playground Hapi Middleware
  • [ ] GraphQL Playground Koa Middleware
  • [ ] GraphQL Playground Lambda Middleware

What OS and OS version are you experiencing the issue(s) on?

Node v14.16.0 // Mac OS Big Sur 11.2.3

What version of graphql-playground(-electron/-middleware) are you experiencing the issue(s) on?

"graphql-playground-react": "^1.7.27",

What is the expected behavior?

as per the instruction in this walkthrough I was expecting to integrate graphql-playground-react with a create-react-app.

What is the actual behavior?

The following error at compile time: `Failed to compile.

./node_modules/graphql-language-service-interface/esm/GraphQLLanguageService.js 132:19
Module parse failed: Unexpected token (132:19)
File was processed with these loaders:
./node_modules/react-scripts/node_modules/babel-loader/lib/index.js
You may need an additional loader to handle the result of these loaders.
|     let customRules = null;
| 
>     if (extensions?.customValidationRules && typeof extensions.customValidationRules === 'function') {
|       customRules = extensions.customValidationRules(this._graphQLConfig);
|     }

Following setup via npm or yarn produces the same error.

What steps may we take to reproduce the behavior?

spin up a create-react-app and try and integrate graphql-playground-react.

Please provide a gif or image of the issue for a quicker response/fix.

allanmaclean avatar May 13 '21 23:05 allanmaclean