eslint-plugin-flowtype-errors: Problems in IntelliJ when node_modules folder is not on top level
I tried out the plugin and it works great as a webpack loader, but I can not make it run in Webstorm / IntelliJ. The problem is that it does not seem to find the plugin as the directory it looks in is not right (should be …src/main/js/…):
Error: Cannot find module ‘/Users/olli/Development/floreysoft/floreysoft-status/node_modules/eslint-plugin-flowtype-errors/dist/collect.js’ at Function.Module._resolveFilename (module.js:455:15) at Function.Module._load (module.js:403:25) at Module.runMain (module.js:590:10) at run (bootstrap_node.js:394:7) at startup (bootstrap_node.js:149:9) at bootstrap_node.js:509:3
at checkExecSyncError (child_process.js:483:13)
at execSync (child_process.js:523:13)
at showErrors (/Users/olli/Development/floreysoft/floreysoft-status/src/main/js/node_modules/eslint-plugin-flowtype-errors/index.js:36:25)
at /Users/olli/Development/floreysoft/floreysoft-status/src/main/js/node_modules/eslint/lib/eslint.js:824:25
at Array.forEach (native)
at EventEmitter.module.exports.api.verify (/Users/olli/Development/floreysoft/floreysoft-status/src/main/js/node_modules/eslint/lib/eslint.js:796:16)
at processText (/Users/olli/Development/floreysoft/floreysoft-status/src/main/js/node_modules/eslint/lib/cli-engine.js:262:31)
at CLIEngine.executeOnText (/Users/olli/Development/floreysoft/floreysoft-status/src/main/js/node_modules/eslint/lib/cli-engine.js:751:26)
at Object.execute (/Users/olli/Development/floreysoft/floreysoft-status/src/main/js/node_modules/eslint/lib/cli.js:181:36)
at /Users/olli/Development/floreysoft/floreysoft-status/src/main/js/node_modules/eslint/bin/eslint.js:57:36
node node_modules/eslint-plugin-flowtype-errors/dist/collect.js
Looking at the code:
const collected = execSync(
`node ${path.normalize('./node_modules/eslint-plugin-flowtype-errors/dist/collect.js')}`
);
it becomes clear why there is this error: my node_modules are simply somewhere else.
Any ideas? Add a configuration path pointing to the location of the node_modules?
This might simply be because of my messed up set up, but without the plugin it works well and it can also load other plugins without a problem.
About this issue
- Original URL
- State: closed
- Created 8 years ago
- Reactions: 1
- Comments: 28 (14 by maintainers)
In IntelliJ it worked even before and it still works with 1.2.6 😃
Yes.