-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
ESLint: Unable to resolve path to module #1180
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Comments
"import/no-unresolved": "off" (as temporary solution) |
Maybe you should track this project.import-js/eslint-plugin-import#496 |
Aha~ I'm facing a same issue like you |
Update: you will face the test problem, too. |
For me it was a case sensitivity issue. I opened the project using |
You have the option of this lib here https://github.com/unconfident/eslint-import-resolver-babel-plugin-root-import |
As @karanssj4 linked to, this seems to be fixed by adding the following to
|
If you crawled through here from google and have absolute paths when importing resulting in eslint screaming at you NOT FOUND: Use eslint-plugin-import:
|
|
You can use this package
|
|
great solution thanks |
I just needed
🎉 |
For people using eslint + webpack + single repo // .eslintrc.js
module.exports = {
...
"settings": {
"import/resolver": {
node: {
paths: [".", "app", "lib", "functions"], //name the subproject folders here!!!
extensions: [".js", ".jsx", ".ts", ".tsx"]
}
},
},
} and you may want some overrides if using storybook // .eslintrc.js
module.exports = {
...
overrides: [
{
files: ["**/*.stories.tsx", "backend/**/*", "storybook/**/*"],
rules: {
"import/no-unresolved": "off",
},
},
],
} |
Unable to resolve path to module 'buefy' |
Working Fine for module aliases. https://github.com/johvin/eslint-import-resolver-alias |
Where to put this? Which file? |
|
For me it is fixed by https://stackoverflow.com/a/71874257/1770571 |
What if I already have a {
"compilerOptions": {
"baseUrl": ".",
"paths": {
"@/components/*": ["components/*"],
"@/styles/*": ["styles/*"],
"@/public/*": ["public/*"],
"@/hooks/*": ["hooks/*"]
}
}
} After I setup eslint, the import aliases doesn't work anymore, how can I tell eslint to respect the |
In .eslintrc.json File Add this lines "settings": { |
We have solution for absolute path, like this:
It is work fine for
yarn start
, but foryarn lint
:I have solution for my other project (no RSK) with WebStorm:
project_dir - Mark Directory as > Resource Root
yarn add eslint-import-resolver-webpack -D
config/default.js
How to solve this issue for RSK? Please help me.
The text was updated successfully, but these errors were encountered: