Markdoc language server on a Next.js app
Author: filiphricCreated Apr 11, 2024Updated Jun 25, 2024
Labelsbug
What happened?
I’ve been trying to set up VS Code Markdown extension, but I keep getting errors and can’t get it to work. I keep hitting the following message:
Here’s my markdoc.config.json
[
{
"id": "docs",
"path": "src/app",
"schema": {
"path": "src/markdoc/config.mjs",
"type": "esm",
"property": "default",
"watch": true
}
}
]The VS Code extenstion output is throwing following error:
TypeError: Cannot read properties of undefined (reading 'markdoc')
at new Documents (/Users/filiphric/.vscode/extensions/stripe.markdoc-language-support-0.0.12/dist/client/server.js:27176:52)
at /Users/filiphric/.vscode/extensions/stripe.markdoc-language-support-0.0.12/dist/client/server.js:27434:7
at Array.map (<anonymous>)
at server (/Users/filiphric/.vscode/extensions/stripe.markdoc-language-support-0.0.12/dist/client/server.js:27432:41)
Node.js v18.18.2
[Error - 07:17:51] Connection to server got closed. Server will not be restarted.I’ve looked into the discussion threads but solutions mentioned there don’t seem to fix the problem for me. Maybe I’m overlooking something.
To reproduce
Here’s a link to the repository
Pull the latest changes from new-docs branch
Version
"@markdoc/markdoc": "^0.4.0", "@markdoc/next.js": "^0.3.7", Markdoc language support v0.0.12
Additional context
I tried v0.0.11 of the extension which does not throw the error into the output console, but throws the same "Command 'Control the Markdoc language server' resulted in an error"
Source: markdoc/markdoc