Home > Back-end >  how to get rid of prettier/prettier error
how to get rid of prettier/prettier error

Time:07-08

This is the error I am receiving when yarn deploying. Cant seem to figure out what happened. I deployed 5 minutes before this without any issues.

Error: Command failed with exit code 1: node_modules/.bin/next build
warn  - The `target` config is deprecated and will be removed in a future version.
See more info here https://nextjs.org/docs/messages/deprecated-target-config

Failed to compile.

./components/layout/Header.tsx
66:117  Error: Insert `⏎··········`  prettier/prettier
67:1  Error: Delete `··`  prettier/prettier

info  - Need to disable some ESLint rules? Learn more here: https://nextjs.org/docs/basic-features/eslint#disabling-rules
info  - Loaded env from /Users/coreykaminski/VCXNFT-1/landing-page/.env.local
info  - Checking validity of types...

error Command failed with exit code 1.

This is the eslintrc.js

plugins: ["@typescript-eslint"],
extends: ["standard", "plugin:prettier/recommended", "plugin:node/recommended"],
parser: "@typescript-eslint/parser",
parserOptions: {
  ecmaVersion: 12,
},
rules: {
  "max-len": ["error", { code: 160, ignoreUrls: true }],
  "node/no-unsupported-features/es-syntax": ["error", { ignores: ["modules"] }],
  "prettier/prettier": [
    "error",
    {
      endOfLine: "auto",
    },
  ],
},
};

this is the json

 "prettier/prettier": [
      "error",
      {
        "endOfLine": "auto"
      }


"plugins": ["@typescript-eslint", "react"],
  "rules": {
    "prettier/prettier": ["error", {}, { "usePrettierrc": true }],

CodePudding user response:

npx prettier --write ./components/layout/Header.tsx or disable prettier eslint.

"prettier/prettier": [
    0,
    {
      endOfLine: "auto",
    },
  ],
  • Related