Many students have encountered the “No inputs were found in config file” error while working on an Astro project, which includes a tsconfig.json file by default. This error typically occurs in VS Code. Although the error may seem puzzling, especially if you are not using TypeScript in your project, there are several possible solutions to fix it.

Here are a few steps to troubleshoot this issue:

  1. Restart VS Code: Sometimes, a simple restart of the VS Code editor can resolve the error. Try closing and reopening VS Code to see if the error persists.

  2. Add an empty file: Create a new file named file.ts in the same directory where the tsconfig.json file is located. This empty file can help resolve the error in some cases.

  3. Remove tsconfig.json: If you are not planning to use TypeScript in your project, consider deleting the tsconfig.json file entirely. Removing it will prevent the error from occurring.

However, if you do plan to use TypeScript, you can configure the tsconfig.json file to include the TypeScript files in your project. To do this:

{
  "compilerOptions": {
    "moduleResolution": "node"
  },
  "include": [
    "./src/**/*.ts"
  ]
}

Make sure to replace ./src/**/*.ts with the correct path to your TypeScript files.

By following these steps, you should be able to resolve the “No inputs were found in config file” error in your tsconfig.json and continue working on your Astro project without any issues.