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.

eslint-config-airbnb error

See original GitHub issue

I’ve added "extends": "eslint-config-airbnb" to an empty .eslintrc file and when I run eslint app I get the following error. If I remove the extends and paste in the node_modules .eslint contents, it works fine. Any ideas? I ran npm install several times

Error: Cannot find module 'eslint-config-airbnb'
Referenced from: /Users/adam/projects/webpack-boiler/.eslintrc
    at Function.Module._resolveFilename (module.js:338:15)
    at Function.Module._load (module.js:280:25)
    at Module.require (module.js:364:17)
    at require (module.js:380:17)
    at loadConfig (/usr/local/lib/node_modules/eslint/lib/config.js:96:48)
    at /usr/local/lib/node_modules/eslint/lib/config.js:123:46
    at Array.reduceRight (native)
    at loadConfig (/usr/local/lib/node_modules/eslint/lib/config.js:111:36)
    at getLocalConfig (/usr/local/lib/node_modules/eslint/lib/config.js:225:23)
    at Config.getConfig (/usr/local/lib/node_modules/eslint/lib/config.js:363:22)
webpack-boiler|⇒
{
  "name": "meteor-webpack-react",
  "version": "0.0.1",
  "description": "A port of simple-todos to Webpack/React on the frontend",
  "repository": "https://www.github.com/jedwards1211/meteor-webpack-react",
  "devDependencies": {
    "babel-eslint": "^4.0.5",
    "babel-loader": "^5.1.2",
    "css-loader": "^0.15.3",
    "eslint": "^1.1.0",
    "eslint-config-airbnb": "0.0.7",
    "eslint-plugin-react": "^3.2.1",
    "node-libs-browser": "^0.5.2",
    "react-hot-loader": "^1.2.7",
    "react-router": "^0.13.3",
    "style-loader": "^0.12.3",
    "webpack": "^1.10.1",
    "webpack-dev-server": "^1.10.1"
  },
  "dependencies": {
    "babel": "^5.6.14",
    "babel-core": "^5.6.20",
    "classnames": "^2.1.3",
    "react": "^0.13.3",
    "react-router": "^0.13.3",
    "lodash": "^3.10.0"
  },
  "scripts": {
    "dev": "scripts/dev.sh",
    "prod": "scripts/prod.sh",
    "build": "scripts/build.sh",
    "test-built": "scripts/test-built.sh"
  },
  "author": "",
  "license": "MIT"
}
{
  "extends": "eslint-config-airbnb"
}

Issue Analytics

  • State:closed
  • Created 8 years ago
  • Reactions:11
  • Comments:37 (2 by maintainers)

github_iconTop GitHub Comments

171reactions
ljharbcommented, Aug 9, 2015

ah, you’re right, i see it there. However, when you run eslint app you’re not running the locally installed version of eslint - the local one should only be run under an npm run-script, which effectively adds node_modules/.bin to the PATH for you. Try ./node_modules/.bin/eslint app to confirm?

117reactions
ljharbcommented, Aug 9, 2015

You still have to manually add the package to your package.json - try npm install --save eslint-config-airbnb

Read more comments on GitHub >

github_iconTop Results From Across the Web

ESLint: Failed to load config "airbnb" to extend from. #2233
The cause of my problem was, I forgot an ".eslintrc.js" file one directory up from my project folder. So it was using the...
Read more >
Failed to load config "airbnb" to extend from - gitlab ci
I created the project with the create-react-app, installed the dependencies separately so as not to overwrite the eslint version. But I've tried ...
Read more >
eslint-config-airbnb - npm
This package provides Airbnb's .eslintrc as an extensible shared config. Usage. We export three ESLint configurations for your usage. eslint- ...
Read more >
eslint-config-airbnb | Yarn - Package Manager
This package provides Airbnb's .eslintrc as an extensible shared config. Usage. We export three ESLint configurations for your usage.
Read more >
Cannot find module 'eslint-config-airbnb-base' #10388
I'm working on a node.js express project , I have installed Eslint globaly npm install -g eslint, then setup a configuration file using...
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