Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot find module 'eslint-plugin-angular' #222

Closed
etsuo opened this issue Sep 20, 2015 · 1 comment
Closed

Cannot find module 'eslint-plugin-angular' #222

etsuo opened this issue Sep 20, 2015 · 1 comment
Labels

Comments

@etsuo
Copy link

etsuo commented Sep 20, 2015

Hi, I'm trying to integrate ESLint into my project and I'm running into the error: "Cannot find module 'eslint-plugin-angular'" when I run $ eslint *.js.

The only way I can get this to run is by installing eslint-plugin-angular globally, but that seems wrong (unless I'm missing something??).

I'm running:

  • node v0.12.7
  • npm 3.3.4
  • eslint v1.5.0
  • eslint-plugin-angular 0.12.0

ESLint is installed globally.

My package.json file has the following entries:

  • "eslint": "^1.5.0",
  • "eslint-plugin-angular": "^0.12.0",

I have $ rm -rf node_modules and rerun $ npm install to make sure there wasn't some kind of npm dependency issue or corruption. I also verified the directory permissions in node_modules to make sure access is possible.

My .eslintrc contains:

{
  "plugins": [
    "angular"
  ],
  "rules": {
    "angular/ng_controller_name": [
      2,
      "/[A-Z].*Controller$/"
    ],
    "quotes": [
      2,
      "single"
    ]
  },
  "globals": {
    "angular": true
  }
}

What am I missing here? Thx!

@etsuo
Copy link
Author

etsuo commented Sep 21, 2015

Found the answer here: http://eslint.org/docs/user-guide/configuring#configuring-plugins

"Note: A globally-installed instance of ESLint can only use globally-installed ESLint plugins. A locally-installed ESLint can make sure of both locally- and globally- installed ESLint plugins."

This falls under read the fine print in the manual. :/ Sorry for the bother. Closing issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants