Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

503
Views
'import-resolver-typescript/lib' not found error in jsconfig.json

Problem:

Error File '/Users/nish7/Documents/Code/WebDev/HOS/frontend/node_modules/eslint-import-resolver-typescript/lib' not found. The file is in the program because: Root file specified for compilation

Steps to reproduction:

  • create-next-app
  • npx jsconfig.json -t nextjs

jsconfig.json

    "compilerOptions": {
        "checkJs": false,
        "resolveJsonModule": true,
        "moduleResolution": "node",
        "target": "es2020",
        "module": "es2015",
        "baseUrl": ".",
        "paths": {
            "@/components/*": ["components/*"],
            "@/styles/*": ["styles/*"],
            "@/pages/*": ["pages/*"],
            "@/utils/*": ["utils/*"],
            "@/theme/*": ["theme/*"]
        }
    },
    "exclude": [
        "dist",
        "node_modules",
        "build",
        ".vscode",
        ".next",
        "coverage",
        ".npm",
        ".yarn"
    ],
    "typeAcquisition": {
        "enable": true,
        "include": ["react", "react-dom"]
    }
}


eslint.rc

{
  "extends": ["next", "next/core-web-vitals"]
}

Specs

  • vscode: Version 1.57.1
  • node: 14.17.1 (LTS)
  • nextjs: 11.0.1

note: I added eslint-import-resolver-typescript module, but still dint work.

Screenshot:

SS

over 4 years ago · Santiago Trujillo
2 answers
Answer question

0

Just restart your all vscode windows, that worked in my case.

over 4 years ago · Santiago Trujillo Report

0

If you are using vscode, try to disable TypeScript › Validate in settings. This solved it for me!

Edit:

Found a more sensible approach than totally disabling validation; setting the TypeScript SDK in the Vscode setting

"typescript.tsdk": "./node_modules/typescript/lib"

over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!