dwesty17
dwesty17

Reputation: 25

Can't get graphql-js test suite to pass out of the box

I forked and cloned a fresh version of the graphql-js repo, and tried to run the test suite using the steps listed in the contributing guide, without having made any changes to the repo...

npm install
npm test

Every time I try this the test suite fails to run with the following 2 errors.

/Users/dw/Developer/open-source/graphql-js/src/error/GraphQLError.js
  86:17  error  Parsing error: Identifier 'GraphQLError' has already been declared

  84 | }
  85 |
> 86 | export function GraphQLError( // eslint-disable-line no-redeclare
     |                 ^
  87 |   message: string,
  88 |   nodes?: $ReadOnlyArray<ASTNode> | ASTNode | void,
  89 |   source?: ?Source,

/Users/dw/Developer/open-source/graphql-js/src/type/definition.js
  352:17  error  Parsing error: Identifier 'GraphQLList' has already been declared

  350 | }
  351 | // eslint-disable-next-line no-redeclare
> 352 | export function GraphQLList(ofType) {
      |                 ^
  353 |   if (this instanceof GraphQLList) {
  354 |     this.ofType = assertType(ofType);
  355 |   } else {

✖ 2 problems (2 errors, 0 warnings)

Hoping someone can help me out with this or has seen it before. Thanks!

Upvotes: 0

Views: 28

Answers (1)

Cito
Cito

Reputation: 5603

Try installing with yarn instead of npm.

I see the same error when I install with npm install (using node 12.13.1 and npm 6.12.1), but when I install with yarn install (using yarn 1.12.1) it works.

Upvotes: 1

Related Questions