How to Resolve the “No inputs were found in config file” Error in tsconfig.json
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:
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.
Add an empty file: Create a new file named
file.ts
in the same directory where thetsconfig.json
file is located. This empty file can help resolve the error in some cases.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:
1 | { |
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.
tags: [“Astro”, “tsconfig.json”, “VS Code”, “TypeScript”]