This error is notoriously fickle to reproduce or resolve. It can always be fixed by adding an export type for a name TS needs to compile your types. Here's how to find where the change needs to be made:
- Navigate to the source of the diagnostic in the repo's _tsc.js file (line 52151 as of TS 5.7.3). You can search for
reportLikelyUnsafeImportRequiredErrorto see all references to it if needed. Add a breakpoint in at that position:
if (!attributes) {
// ADD BREAKPOINT HERE ⬇️
context.encounteredError = true