← All tasks
javascriptprettier/eslint-plugin-prettier #322Not a task: already works

Error: eslint-plugin-prettier tried to access eslint-config-prettier, but it isn't declared in its dependencies

envgap__prettier__eslint-plugin-prettier-322

01 / FAILURE SIGNATURE

As reported upstream

(node:7832) [MODULE_NOT_FOUND] Error: eslint-plugin-prettier tried to access eslint-config-prettier, but it isn't
Not a benchmark task.
  • The project already builds and runs before the fix, so there is nothing to repair.

02 / ENVIRONMENT RECIPE

Base commit
885f48405e0fc9f312acdd3e3487c824bd59c102
Manifest
package.json
Reproduce
Awaiting issue-specific recipe
Run under trace
Awaiting a meaningful runtime command

03 / ORIGINAL ISSUE TEXT

prettier/eslint-plugin-prettier #322 · read the original issue
<!-- If you're reporting a bug, please provide the following information to make it easier to triage your issue. If you don't provide this information, your issue may be closed. If a question isn't applicable to your report, feel free to skip it/delete it. -->



**What version of `eslint` are you using?**

v7.6.0



**What version of `prettier` are you using?**

2.0.5



**What version of `eslint-plugin-prettier` are you using?**

3.1.4



**Please paste any applicable config files that you're using (e.g. `.prettierrc` or `.eslintrc` files)**

**eslintrc**

``` 

...

  plugins: [

    'import',

    'md',

    '@typescript-eslint',

    'optimize-regex',

    'no-secrets',

    'security',

    'editorconfig',

    'json',

    'promise',

    'prettier'

  ],

  extends: [

    'eslint:recommended',

    'plugin:@typescript-eslint/recommended',

    'plugin:json/recommended',

    'plugin:md/recommended',

    'plugin:security/recommended',

    'plugin:editorconfig/noconflict',

    'plugin:import/errors',

    'plugin:import/warnings',

    'plugin:import/typescript',

    'plugin:promise/recommended',

    'plugin:prettier/recommended',

    'prettier/@typescript-eslint'

  ],

,,,

```



**package.json**

```

...

  "devDependencies": {

    "@typescript-eslint/eslint-plugin": "^3.8.0",

    "@typescript-eslint/parser": "^3.8.0",

    "@yarnpkg/builder": "^2.1.0",

    "eslint": "^7.6.0",

    "eslint-config-prettier": "^6.11.0",

    "eslint-plugin-editorconfig": "^2.1.3",

    "eslint-plugin-import": "^2.22.0",

    "eslint-plugin-json": "^2.1.2",

    "eslint-plugin-md": "^1.0.19",

    "eslint-plugin-no-secrets": "^0.6.8",

    "eslint-plugin-optimize-regex": "^1.2.0",

    "eslint-plugin-prettier": "^3.1.4",

    "eslint-plugin-promise": "^4.2.1",

    "eslint-plugin-security": "^1.4.0",

    "husky": "^4.2.5",

    "markdown-eslint-parser": "^1.2.1",

    "prettier": "2.0.5",

    "prettier-plugin-organize-imports": "1.1.1",

    "prettier-plugin-package": "^1.0.0",

    "pretty-quick": "2.0.1",

    "typescript": "^3.9.7"

  },

...

```



**What source code are you linting?**

Various.

not relevant.



**What did you expect to happen?**



No warning to be issued by YARN because of the above.

The `eslint-config-prettier` should be part of `eslint-plugin-prettier` dependencies or peerDependencies. other package managers may not report such issue because they are not as strict in having dependencies being declared before being used.



**YARN version - IMPORTANT**

2.1.1



**What actually happened?**



```

(node:7832) [MODULE_NOT_FOUND] Error: eslint-plugin-prettier tried to access eslint-config-prettier, but it isn't 

declared in its dependencies; this makes the require call ambiguous and unsound.

```

then linting happens with no issue.

Continue on GitHub ↗

04 / LABELS

Labels from the report text only; not yet run

No supported category has been assigned.

Label rules and the text that matched
[]