Warning "At least one tsconfig.json was not found in the project" in a `node_modules` context

  • ALM used: GitHub

  • Languages of the repository: TypeScript

  • SonarCloud project: OlivierZal/com.melcloud

  • Error observed:

The commit analysis works but raises a warning (available under “See details” on the top right of this page):

Analysis status

Last analysis has warnings

At least one tsconfig.json was not found in the project. Please run ‘npm install’ for a more complete analysis. Check analysis logs for more details.

although I have a tsconfig.json file on my project’s root:

  "extends": "@tsconfig/node20/tsconfig.json",
  "compilerOptions": {
    "lib": ["DOM", "ESNext"],
    "module": "CommonJS",
    "moduleResolution": "Node",
    "outDir": ".homeybuild/",
    "target": "ESNext",
    "skipLibCheck": true,
    "strict": true

even if I explicitly define the following paths under "Administration > General Settings > Languages > TypeScript > TypeScript tsconfig.json location:

  • tsconfig.json
  • ./tsconfig.json
  • **/tsconfig.json

I guess this warning is raised because I didn’t commit node_modules in my GitHub project, so SonarCloud does not find the @tsconfig/node20/tsconfig.json defined in the tsconfig.json’s "extends".

If so, there could be an option to disable such a warning, because there are some cases where it’s not necessary to commit all the node_modules.

hello @OlivierZal ,

sorry for the late reply and thank you for this feedback. Indeed, the analyzer is trying to resolve "extends": "@tsconfig/node20/tsconfig.json" reference. You don’t need to commit your node_modules, you can just call npm install before the analysis.

Thanks for your answer.