TS error: "Cannot write file 'src/admin/app.example.js' because it would overwrite input file."

System Information
  • Strapi Version: 4.4.7
  • Operating System:
  • Database: Postgres (production) SQLite (development)
  • Node Version: 16.17.0
  • NPM Version: 8.19.2
  • Yarn Version: 1.22.19

Getting this TS error in my .cache/admin/src/tsconfig.json file:
JSON schema for the TypeScript compiler’s configuration file

Cannot write file ‘/Users/hl/Documents/GitHub/tbcc-db/src/admin/app.example.js’ because it would overwrite input file.

I have no idea what I did to cause this. I realise I could clear the .cache folder and start over but that would wipe a whole lot of settings, right?

Any ideas?

This has now gone away. No idea what caused it!

Usually you can safely delete the .cache folder. I’m not aware of any setting in there that’s not also part of the main codebase (src folder) or the database. If in doubt, rename it or move it somewhere else instead of deleting it, so l that you can go back.