question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Parsing error: Loader Url has no sync mode

See original GitHub issue

Hi. I was trying out this eslint plugin today and I am facing this error in all my GQL files both when linting via the CLI as well as the VSCode extension.

1

This error is thrown for every GQL file I use.

I tried to isolate the problem by removing all other eslint rules and just having this plugin around and still had this issue.

My graphql-config is configured correctly cause both the codegen and the VSCode GraphQL extension which uses it are working correctly. I am using multiple projects with both remote and local schema which works well with codegen and extension.

I also noticed other people reporting similar error but with apollo eslint rather:

https://github.com/apollographql/eslint-plugin-graphql/issues/287 https://github.com/apollographql/eslint-plugin-graphql/issues/270#issuecomment-700032602

Any clues? Thanks.

My .eslintrc file:

{
  "overrides": [
    {
      "files": ["*.gql"],
      "parser": "@graphql-eslint/eslint-plugin",
      "plugins": ["@graphql-eslint"],
      "rules": {
        "avoid-operation-name-prefix": [
          "error",
          { "keywords": "get" }
        ],
        "input-name": [
          "error",
          { "checkInputType": true }
          ],
          "description-style": [
          "error",
          { "style": "block" }
          ],
          "naming-convention": [
          "error",
          {
            "FieldDefinition": "camelCase",
            "ObjectTypeDefinition": "PascalCase"
          }
          ],
          "no-anonymous-operations": ["error"],
          "require-deprecation-reason": "error",
          "no-case-insensitive-enum-values-duplicates": ["error"],
          "no-operation-name-suffix": ["error"],
          "require-id-when-available": ["error",
          {
            "fieldName": "id"
          }
          ],
          "validate-against-schema": ["error"],
          "require-description": [
            "error",
            { "on": ["ObjectTypeDefinition", "FieldDefinition"] }
          ]
      }
    }
  ]
}

My package.json

"name":"...",
"version":"...",
"scripts": {
    "lint": "eslint --ext=.gql ./packages",
}
"devDependencies": {
    "@graphql-codegen/add": "^2.0.1",
    "@graphql-codegen/cli": "^1.17.10",
    "@graphql-codegen/typed-document-node": "^1.17.9",
    "@graphql-codegen/typescript": "^1.17.10",
    "@graphql-codegen/typescript-operations": "^1.17.8",
    "@graphql-codegen/typescript-resolvers": "^1.17.10",
    "@graphql-eslint/eslint-plugin": "^0.4.1",
    "@graphql-typed-document-node/core": "^3.1.0",
    "@types/body-parser": "^1.19.0",
    "@types/express": "^4.17.8",
    "@types/node": "^14.11.8",
    "@types/qs": "6.9.5",
    "@typescript-eslint/eslint-plugin": "^4.4.1",
    "@typescript-eslint/parser": "^4.4.1",
    "concurrently": "^5.3.0",
    "eslint": "^7.11.0",
    "globby": "^11.0.1",
    "morgan": "^1.10.0",
    "nodemon": "^2.0.5",
    "plop": "^2.7.4",
    "rimraf": "^3.0.2",
    "typedoc": "^0.19.2",
    "typescript": "4.0.3",
    "utility-types": "^3.10.0"
  },
  "dependencies": {
    "graphql": "^15.4.0",
    "graphql-modules": "^1.0.0-alpha.2"
  }

CC: @dotansimha

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:10 (2 by maintainers)

github_iconTop GitHub Comments

2reactions
tvvigneshcommented, Nov 4, 2020

@dotansimha @ardatan Perfect! This works great. Just tested it out. You can close this.

2reactions
tvvigneshcommented, Nov 4, 2020

@dotansimha Sure. Will check and report back in 10 minutes.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Parsing error: Loader Url has no sync mode #132 - GitHub
Hi. I was trying out this eslint plugin today and I am facing this error in all my GQL files both when linting...
Read more >
Red Hat Satellite 6: Capsule sync fails with Error: Katello ...
Issue. Error: Katello::Errors::Pulp3Error Parsing interrupted: The repository metadata being synced into Pulp is erroneous in a way that makes ...
Read more >
Webpack Module Warning: Failed to parse source map from ...
I have the same problem. This isn't a solution, but a better workaround than the other "answer": change your webpack.config.js module.rules ...
Read more >
url-loader | webpack - JS.ORG
url -loader works like file-loader , but can return a DataURL if the file is smaller than a byte limit. index.js import img...
Read more >
Salesforce Troubleshooting Guide - Salesloft Help Center
This error means there that you do not have access rights to modify the cross-reference id. This could be a result of updating...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found