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.

PKG ERR! when extending eslint configs

See original GitHub issue

I have the following .eslintrc in one of my projects:

{
  "extends": "touchlay",
  "env": {
    "node": true
  }
}

Additionally, I have eslint-config-touchlay installed and in package.json:

{
  ...
  "devDependencies": {
    ...
    "eslint-config-touchlay": "^0.2.2",
    ...
  }
}

eslint-config-touchlay has the plugins and other dependencies in its package.json, so they get installed correctly and linting works fine, however, running npm-check does not:

eslint-plugin-react              😟  PKG ERR!  Not in the package.json. Found in: /.eslintrc

eslint-config-standard           😟  PKG ERR!  Not in the package.json. Found in: /.eslintrc

eslint-config-plugin:import      😟  MISSING!  Not installed.
                                 😟  PKG ERR!  Not in the package.json. Found in: /.eslintrc
                                 ⛔️  NPM ERR!  Registry error Package `eslint-config-plugin:import` doesn't exist

eslint-plugin-standard           😟  PKG ERR!  Not in the package.json. Found in: /.eslintrc

eslint-plugin-promise            😟  PKG ERR!  Not in the package.json. Found in: /.eslintrc

Use npm-check -u for interactive update.

It also seems to have a problem (NPM ERR!) with eslint-config-plugin, which uses the following syntax to load the plugin via extends: "plugin:import/errors", "plugin:import/warnings"

Issue Analytics

  • State:open
  • Created 7 years ago
  • Reactions:5
  • Comments:11

github_iconTop GitHub Comments

4reactions
benjaminecommented, Nov 24, 2016

got this too:

eslint-config-plugin:react   😟  MISSING! Not installed.
                             😟  PKG ERR! Not in the package.json. Found in: /.eslintrc.json
                             ⛔  NPM ERR!  Registry error Package `eslint-config-plugin:react` doesn't exi

because my .eslintrc.json says:

{
  "extends": [
    "standard",
    "plugin:react/all"
  ]
}

and note that “plugin:react/all” actually comes from package named "eslint-plugin-react"

2reactions
rumplcommented, Mar 2, 2020

Maintainer of depcheck here, surely the culprit for this issue.

Any chance that this will be considered to be fixed or not?

There is 100% chance it will be done if you open a PR yes.

I will take a look on my side and make a PR here to update the dependency

Read more comments on GitHub >

github_iconTop Results From Across the Web

ESLint extend error : Failing to load config - Stack Overflow
Having eslintrc.json in the project root shouldn't be a problem. Could you please post the content of package.json ?
Read more >
Configuration Files - ESLint - Pluggable JavaScript Linter
A pluggable and configurable linter tool for identifying and reporting on patterns in JavaScript. Maintain your code quality with ease.
Read more >
eslint-config-universe-error - npm package - Snyk
An important project maintenance signal to consider for eslint-config-universe-error is that it hasn't seen any new versions released to npm in ...
Read more >
[eslint] failed to load config "react-app" to extend from - You.com
To solve your error message, you can simply remove the entry or replace it with a proper shared config (e.g. "eslint-config-airbnb" ). Make...
Read more >
@techmmunity/eslint-config - npm
This package may not be updated so often, but it not means that it has been abandoned. We do the config in a...
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