Unable to resolve path to module in vscode
See original GitHub issueMy eslint passes when running from terminal and in ci. However, in vscode, all absolute paths inside the project cannot be resolved.
import formats from 'formatting'
ex. Error:
Unable to resolve path to module 'formatting'
module "/Users/hannah/project-folder/subfolder_app/src/formatting/index"
.eslintrc (inside subfolder_app)
...
"env": {
"browser": false
},
"settings": {
"flowtype": {
"onlyFilesWithFlowAnnotation": true
},
"import/resolver": {
"node": {
"paths": ["./src", "./src/style"],
"extensions": [".js", ".jsx"]
}
},
"import/core-modules": ["redux-saga/effects"]
},
...
Issue Analytics
- State:
- Created 5 years ago
- Comments:8 (4 by maintainers)
Top Results From Across the Web
Using eslint with typescript - Unable to resolve path to module
You can set the ESLint module import resolution by adding this snippet to your .eslintrc.json configuration file:
Read more >ESLint Unable to resolve path to module
Visual Studio 2022 shows errors for tsconfig paths when it's actually able to find them. Also, I couldn't even get my ESLint to...
Read more >Can't resolve path alias : r/reactjs - Reddit
I'm trying to use alias for paths but I can't seem to get it to work I keep getting this error even though...
Read more >unable to resolve path to module eslint - Code Grepper
unable to resolve path to module eslint ; 1. /*SM*/ ; 2. /*Add the following to your eslintrc file*/ ; 3. { ;...
Read more >React Native, Typescript and VS Code: Unable to resolve ...
React Native, Typescript and VS Code: Unable to resolve module · Reset the tool that watches files for changes on disk: · Rebuild...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@hannahjin I assume that this is a problem of configuring the working directories correctly. Please see
eslint.workingDirectories
here https://github.com/Microsoft/vscode-eslint.If you provide me with a GitHub repository I can clone that demos this I can have a look as well.
Great. Closing then.