robin1liu / vue-mermaid

flowchart of mermaid with vue component
MIT License
124 stars 25 forks source link

This dependency was not found #29

Open CodeSmolder opened 2 years ago

CodeSmolder commented 2 years ago

Hi,

I have tried to install vue-mermaid in combination with vue.js 2.6.11.

Following the readme I have used

npm install --save vue-mermaid

and then I added the following lines to my main.js file: import VueMermaid from "vue-mermaid"; Vue.use(VueMermaid);

When I am starting vue with

npm run serve

it results in the following error message:

ERROR Failed to compile with 1 error 18:36:34

This dependency was not found:

* vue-mermaid in ./src/main.js

To install it, you can run: npm install --save vue-mermaid

Can anybody help?

liguitong commented 2 years ago

I've the same problem,have you resolve this?

CodeSmolder commented 2 years ago

As a workaround I have copied the two files vue-mermaid.js and index.js to a subfolder name mermaid under src in my project.

Now it works by importing the following:

import VueMermaid from "./vue-mermaid/index.js"; Vue.use(VueMermaid);

jonaswebdev commented 2 years ago

Worked for me on this way:

import VueMermaid from "vue-mermaid/src";
Vue.use(VueMermaid);
mrzygood commented 2 years ago

@jonaswebdev Thanks, works for me.

The-Gamer-01 commented 1 year ago

Worked for me on this way:

import VueMermaid from "vue-mermaid/src";
Vue.use(VueMermaid);

Thanks, works for me.