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
The docs mention that we can use draft: true in both .md and .mdx files
I have a page with an empty mdx file with this:
---
draft: true
---
When I go to build the project I get the following error:
[astro:jsx] Transform failed with 1 error:
/Users/foo/Documents/Personal/loyalpotato.dev/src/pages/posts/empty.mdx:2:5: ERROR: Expected ";" but found ":"
file: /Users/foo/Documents/Personal/loyalpotato.dev/src/pages/posts/empty.mdx
error Expected ";" but found ":"
File:
/Users/foo/Documents/Personal/loyalpotato.dev/src/pages/posts/empty.mdx:2:5
Code:
1 | ---
> 2 | draft: true
| ^
3 | ---
Stacktrace:
Error: Transform failed with 1 error:
/Users/foo/Documents/Personal/loyalpotato.dev/src/pages/posts/empty.mdx:2:5: ERROR: Expected ";" but found ":"
at failureErrorWithLog (/Users/foo/Documents/Personal/loyalpotato.dev/node_modules/esbuild/lib/main.js:1624:15)
at /Users/foo/Documents/Personal/loyalpotato.dev/node_modules/esbuild/lib/main.js:1413:29
at /Users/foo/Documents/Personal/loyalpotato.dev/node_modules/esbuild/lib/main.js:678:9
at handleIncomingPacket (/Users/foo/Documents/Personal/loyalpotato.dev/node_modules/esbuild/lib/main.js:775:9)
at Socket.readFromStdout (/Users/foo/Documents/Personal/loyalpotato.dev/node_modules/esbuild/lib/main.js:644:7)
at Socket.emit (node:events:520:28)
at Socket.emit (node:domain:475:12)
at addChunk (node:internal/streams/readable:315:12)
at readableAddChunk (node:internal/streams/readable:289:9)
at Socket.Readable.push (node:internal/streams/readable:228:10)
Thanks for documenting and solving this. I ran into the same problem. I opened withastro/roadmap#420 to suggest to make the console output more helpful in this / such a situation.
What version of
astro
are you using?1.6.9
Are you using an SSR adapter? If so, which one?
None
What package manager are you using?
yarn
What operating system are you using?
Mac
Describe the Bug
The docs mention that we can use
draft: true
in both .md and .mdx filesI have a page with an empty mdx file with this:
When I go to build the project I get the following error:
Link to Minimal Reproducible Example
https://codesandbox.io/s/silly-shannon-iuzder?file=/src/pages/index.astro
Participation
The text was updated successfully, but these errors were encountered: