emersonbottero/vitepress-plugin-mermaid

"vitepress-plugin-mermaid" has no exported member 'withMermaid'

Intevel opened this issue ยท 19 comments

It exports in here

export const withMermaid = (config: UserConfig) => {

Can you share your repo?

Hi, @emersonbottero

I also encountered this problem.
Perhaps we need to check if the source code of Github matches the package of NPM.

https://www.npmjs.com/package/vitepress-plugin-mermaid?activeTab=code

Hi, @emersonbottero

I also encountered this problem.

Perhaps we need to check if the source code of Github matches the package of NPM.

https://www.npmjs.com/package/vitepress-plugin-mermaid?activeTab=code

It doesn't match. On npm only the render function is exported.

@emersonbottero Can you please publish a new version?

can you lock the version to the previous working one?
My fix PR should be released this Wednesday by mermaid team and I have an unpublished version with lot of fixes waiting just for that..

This doesn't seem to work very well. Thanks all the same.

image

package.json :

{
  "name": "ngbatis-docs",
  "version": "1.0.0",
  "description": "",
  "main": "index.js",
  "scripts": {
    "test": "echo \"Error: no test specified\" && exit 1",
    "docs:dev": "vitepress dev docs",
    "docs:build": "vitepress build docs",
    "docs:preview": "vitepress preview docs"
  },
  "keywords": [],
  "author": "",
  "license": "ISC",
  "devDependencies": {
    "vitepress": "1.0.0-alpha.76",
    "vitepress-plugin-mermaid": "^2.0.8"
  }
}

try that combination..
image

you must remove ^ from the mermaid version

try that combination.. image

you must remove ^ from the mermaid version

But this is a workaround, not a real fix. Maybe you just publish the current version?

Btw, this doesnt work with this versions.

can you share your repo?
and the problem is with mermaid.. no this plugin..
once mermaid fix it you can install the last version of mermaid

image

I made an PR for you

image

I made an PR for you

I see the effect. This is awesome. Thank you so much.

I have same problem.
I cannot find index.ts in the dist direcotry.

skanehira@gorilla this-week-in-gorilla/node_modules/vitepress-plugin-mermaid 
$ tree .   
.
โ”œโ”€โ”€ LICENSE
โ”œโ”€โ”€ README.md
โ”œโ”€โ”€ dist
โ”‚   โ”œโ”€โ”€ Mermaid.vue
โ”‚   โ”œโ”€โ”€ mermaid.ts
โ”‚   โ”œโ”€โ”€ vitepress-plugin-mermaid.es.mjs
โ”‚   โ””โ”€โ”€ vitepress-plugin-mermaid.umd.js
โ”œโ”€โ”€ node_modules
โ””โ”€โ”€ package.json

3 directories, 7 files

I tried the following, but index.ts still does not exist.

#46 (comment)

How can I solve this problem?
My repo is https://github.com/skanehira/this-week-in-gorilla

It works for some reason to import, however it still shows as an error. What to use @ts-expect-error for TypeScript projects

Still occurs in 2.0.11

Fixed in #48, for temporary usage you can use @intevel/vitepress-plugin-mermaid@2.0.15

@Intevel
image
In my environment, although it also reports errors, it is indeed usable.

@Intevel image In my environment, although it also reports errors, it is indeed usable.

I just made a PR which fixes that, until its released you can use my version of publish:

npm install @intevel/vitepress-plugin-mermaid@2.0.15
// or 
yarn add @intevel/vitepress-plugin-mermaid@2.0.15