emersonbottero / vitepress-plugin-mermaid

Add mermaid support for Vitepress
MIT License
95 stars 22 forks source link

Error when rendering mermaid chart on vitepress instance #55

Closed jcstein closed 1 year ago

jcstein commented 1 year ago

When settting up mermaid chart in vitepress site, I run into these build dep errors:

1:32:42 PM [vitepress] .vitepress/config.ts changed, restarting server...

Failed to resolve dependency: @braintree/sanitize-url, present in 'optimizeDeps.include'
Failed to resolve dependency: dayjs, present in 'optimizeDeps.include'
Failed to resolve dependency: debug, present in 'optimizeDeps.include'
Failed to resolve dependency: cytoscape-cose-bilkent, present in 'optimizeDeps.include'
Failed to resolve dependency: cytoscape, present in 'optimizeDeps.include'

on this commit, i added it commented out: https://github.com/jcstein/rollkit-vitepress/commit/ba2fd9bd492c8e59356017af0ae259aa443fa99c

and on this branch i have the version that I was trying: https://github.com/jcstein/rollkit-vitepress/tree/jcs/mermaid

emersonbottero commented 1 year ago

could you delete node_modules and pnpm-lock and try pnpm install --shamefully-hoist ?

if still doesn´t work could you try replacing pnpm with npm?

jcstein commented 1 year ago

that worked! i am running into an issue using github pages so think i will also switch to npm! thanks again for the help