Error: Unsupported Index Signature Parameter in Next.js App Build

Just got thrown this error during building my Next.js app:
Error: Unsupported index signature parameter
details: An index signature parameter type must be `string`, `symbol`, a template literal type or a refinement of the previous types
    at new Cx (/home/anna/d/git.redstonesucht.de/NTW/MWS.git/backend/.next/server/app/api/[[...page]]/route.js:11:7834)
    at n (/home/anna/d/git.redstonesucht.de/NTW/MWS.git/backend/.next/server/app/api/[[...page]]/route.js:11:13255)
    at CQ (/home/anna/d/git.redstonesucht.de/NTW/MWS.git/backend/.next/server/app/api/[[...page]]/route.js:11:13591)
    at jJ (/home/anna/d/git.redstonesucht.de/NTW/MWS.git/backend/.next/server/app/api/[[...page]]/route.js:11:43271)
    at jG (/home/anna/d/git.redstonesucht.de/NTW/MWS.git/backend/.next/server/app/api/[[...page]]/route.js:11:43563)
    at jX (/home/anna/d/git.redstonesucht.de/NTW/MWS.git/backend/.next/server/app/api/[[...page]]/route.js:11:43923)
    at j0 (/home/anna/d/git.redstonesucht.de/NTW/MWS.git/backend/.next/server/app/api/[[...page]]/route.js:11:44037)
    at 32791 (/home/anna/d/git.redstonesucht.de/NTW/MWS.git/backend/.next/server/app/api/[[...page]]/route.js:15:62768)
    at t (/home/anna/d/git.redstonesucht.de/NTW/MWS.git/backend/.next/server/webpack-runtime.js:1:485)
    at r (/home/anna/d/git.redstonesucht.de/NTW/MWS.git/backend/.next/server/app/api/[[...page]]/route.js:66:1946)

where the first line number hints into bundled code of Effect/Schema's Refinement (called Cx 'cuz of minification), which seems to come from Schema.Record({ key: TenantID /* here */ , value: Schema.Struct({}) })
TenantID is a Schema.Int.pipe(Schema.brand("TenantID"))

Any idea why?
Was this page helpful?