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

Can't get it working with Flowtype #999

Closed
jaimeagudo opened this issue Oct 11, 2017 · 3 comments

Comments

@jaimeagudo
Copy link

commented Oct 11, 2017

I have followed the instructions for https://standardjs.com/index.html#flow on node v8.6.0

package.json

"standard": {
    "parser": "babel-eslint",
    "plugins": [
      "flowtype"
    ]
  },
..
"devDependencies": {
    "babel-eslint": "^8.0.1",
    "eslint": "^4.8.0",
    "eslint-plugin-flowtype": "^2.39.1",
}

$standard

standard: Unexpected linter output:

Error: Failed to load plugin flowtype: Cannot find module 'eslint-plugin-flowtype'
    at Function.Module._resolveFilename (module.js:527:15)
    at Function.Module._load (module.js:476:23)
    at Module.require (module.js:568:17)
    at require (internal/module.js:11:18)
    at Object.load (/usr/local/lib/node_modules/standard/node_modules/eslint/lib/config/plugins.js:129:26)
    at Array.forEach (<anonymous>)
    at Object.loadAll (/usr/local/lib/node_modules/standard/node_modules/eslint/lib/config/plugins.js:151:21)
    at Config.getConfig (/usr/local/lib/node_modules/standard/node_modules/eslint/lib/config.js:305:17)
    at hashOfConfigFor (/usr/local/lib/node_modules/standard/node_modules/eslint/lib/cli-engine.js:599:41)
    at executeOnFile (/usr/local/lib/node_modules/standard/node_modules/eslint/lib/cli-engine.js:648:32)

If you think this is a bug in `standard`, open an issue: https://github.com/feross/standard/issues

Have tried everything, global, local installation with npm & yarn... am I missing something?

@ematipico

This comment has been minimized.

Copy link
Contributor

commented Oct 19, 2017

Duplicate of #984

@ematipico ematipico marked this as a duplicate of #984 Oct 19, 2017

@KalebPortillo

This comment has been minimized.

Copy link

commented Mar 29, 2018

same here, nothing in #984 worked

@feross

This comment has been minimized.

Copy link
Member

commented May 15, 2018

@jaimeagudo You should not be depending on eslint in your package.json. Just install standard (which already contains eslint as a dependency).

The error is happening because you installed standard globally but you installed eslint-plugin-flowtype locally. When you run the global standard command, it doesn't know where to find eslint-plugin-flowtype.

@feross feross closed this May 15, 2018

@feross feross added the question label May 15, 2018

@lock lock bot locked as resolved and limited conversation to collaborators Aug 19, 2018

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
4 participants
You can’t perform that action at this time.