Error @nuxtjs/mdc on reload
I got a Error and i dont understand the problem.
When i reload a test of the mdc lib with version 0.9 i got this error
i got this code from the exemple of the doc i just remplaced the value of the variable in the nuxtjs/mdc doc
12 Replies
i added a reproduction
https://stackblitz.com/edit/nuxt-starter-hikq4a?file=app.vue
bertyn
StackBlitz
Nuxt - Starter (forked) - StackBlitz
Create a new Nuxt project, module, layer or start from a theme with our collection of starters.
put MDC in <ClientOnly>
That works for me. MDC makes requests to an endpoint in nitro. Not sure, why this happens tho.
or make the component client rendered, by adding .client.vue to the file name
even with ClientOnly still the same bug
i made it work with the reproduction but in my project this still dont work
i think the prob came from the combination with nuxt ui
ok i got the solution without client only
add a .npmrc file with shamefully-hoist=true
and you can remove the client only it will work
oh yeah, right. i tried shamefully-hoist=true too, but only ClientOnly worked for me
I am receiving the same issue!
you use nuxt/mdc or nuxt/content ?
Had a similar issue using nuxt content in the past. It randomly started giving the error you were getting adding this to nuxt config solved it
content: {
experimental: {
clientDB: true,
},
},
idk with mdc has something similar i'm mentinoing this since you refered to nuxt/content
for nuxt/mdc you just need to add this file
.npmrc
remove node module and re install the depency with
npm i
Thanks, a quick question, will
MDC
be able to render Markdown content in a stringified form?
PS: Thanks, it works perfectly!
I am using pnpm
instead of npm
and this solution is still working!MDC
was created for that he is used behind the curtain by nuxt/content