#cannot find base config
3 messages · Page 1 of 1 (latest)
The warning message you're seeing indicates that the tsconfig.json file in your Astro project is trying to extend a base configuration file located at astro/tsconfigs/base, but it cannot find this file.
Astro starter projects include a tsconfig.json file in your project. This file is important so that tools like Astro and VS Code know how to understand your project. Some features (like npm package imports) aren’t fully supported in the editor without a tsconfig.json file. If you install Astro manually, be sure to create this file yourself.
Astro includes three extensible tsconfig.json templates: base, strict, and strictest. The base template enables support for modern JavaScript features and is also used as a basis for the other templates. You can view and compare the three template configurations at astro/tsconfigs/ (https://github.com/withastro/astro/blob/main/packages/astro/tsconfigs/).
To inherit from one of the templates, use the extends setting in your tsconfig.json file:
{ "extends": "astro/tsconfigs/base"}
If you're still seeing this warning, it's possible that the astro/tsconfigs/base file is not in the expected location, or there's an issue with the path specified in the extends field. Make sure that the path to the base configuration file is correct.
If you're not using one of the Astro starter projects, you may need to manually create the tsconfig.json file and set it up to extend the appropriate base configuration file.
For more information, refer to the Astro TypeScript setup guide (https://docs.astro.build/en/guides/typescript/#setup) and the Astro manual installation guide (https://docs.astro.build/en/install/manual/).
Sources:
- Astro TypeScript Guide (https://docs.astro.build/en/guides/typescript/)
- Astro Manual Installation Guide (https://docs.astro.build/en/install/manual/)