In my .jsx module I get this error
Unable to resolve path to module
How can I fix it? The imported module exist.
I use eslint-plugin-import, github issue here
In my .jsx module I get this error
Unable to resolve path to module
How can I fix it? The imported module exist.
I use eslint-plugin-import, github issue here
It might be that eslint-import doesn't automatically include the .jsx
extension. You can try this:
Add to your .eslintrc:
"settings": {
"import/extensions": [".js", ".jsx"]
}
If just that doesn't help, try to add eslint-import-resolver-webpack as a devDependency.
npm i -D eslint-import-resolver-webpack
And include it in the .eslintrc settings:
"settings": {
"import/resolver": "webpack",
"import/extensions": [".js", ".jsx"]
}
You may need to configure the "module roots" in webpack:
resolve: {
modules: ['app', 'node_modules']
}
You might need to replace modules
by root
in webpack 1.x.
If it still don't work (and it does in command line), it might be a sublime linter issue: https://www.npmjs.com/package/eslint-plugin-import#sublimelinter-eslint