E0359 Declaration of something that does not exist
Words in italics are filled in when the compiler reports it, such as the element's name or the list of known ones.
Why
declare const, let, var, function, class and enum, declare module, declare global and namespace tell TypeScript that something exists without making it. The page type-checks, builds, and then fails when it runs with "secret is not defined". Duolith refuses them in pages, components and the project's own .ts and .d.ts files (decision 0097).
How to fix it
Import the value from the module that has it, or define it in the script block. A type that several files share goes in a .ts file the pages import with import type.
In a terminal
duolith explain E0359