question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Unable to resolve path to module in vscode

See original GitHub issue

My 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:closed
  • Created 5 years ago
  • Comments:8 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
dbaeumercommented, Jan 8, 2019

@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.

0reactions
dbaeumercommented, Jan 14, 2019

Great. Closing then.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found