You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm getting a "Top-level return cannot be used inside an ECMAScript module" error. When trying to reduce the error, it appears to go away once I simplify the surrounding code enough, so I suspect it's caused by the presence of another error. However, that means the real error is replaced by this incorrect one, which makes it hard to fix the other error. See the stackblitz below for the complex reproduction.
And, in fact, this one was caused by an underlying error on the await inside the page template. So the bug isn't that the page should work, but that it should show the right error.
What version of
astro
are you using?1.9.2
Are you using an SSR adapter? If so, which one?
Node
What package manager are you using?
npm
What operating system are you using?
Linux
Describe the Bug
I'm getting a "Top-level return cannot be used inside an ECMAScript module" error. When trying to reduce the error, it appears to go away once I simplify the surrounding code enough, so I suspect it's caused by the presence of another error. However, that means the real error is replaced by this incorrect one, which makes it hard to fix the other error. See the stackblitz below for the complex reproduction.
Link to Minimal Reproducible Example
https://stackblitz.com/edit/github-hz21xe?file=src/pages/[...crawl_date].astro
Participation
The text was updated successfully, but these errors were encountered: