Category: Next.js, React and TypeScript

TypeScript TS18003 No inputs were found in config file

Read this guide in Polish

The tsc command reports that it did not find any input files, although repo has .ts and .tsx files. Includes rules, exclusive or tsconfig indication may exclude the actual location of the code.

How to identify the source of the problem

Check which directory you run tsc and which tsconfig is actually indicated by the command. Compare include and exclusive with the location of src, app and tests directories.

Compare the message from the console with the result of the production compilation and the condition after the page has been refreshed.

Repair steps

Set the correct include patterns for source files; exclude only actual build output directories. For monorepo check references and tsc -p commands for a particular project, not blindly global tsconfig.

How to Test Solution

Typecheck finds project files and reports actual bugs instead of ending with TS18003.

Security and restrictions

Do not add an accidental empty .ts file just to remove the error without validating the code.