jerosoler / Drawflow

Simple flow library 🖥️🖱️
https://jerosoler.github.io/Drawflow/
MIT License
4.41k stars 713 forks source link

Reference error in VS Code #865

Closed yvanblanchard closed 1 month ago

yvanblanchard commented 1 month ago

Hello,

I downloaded the source , ran npm for installing, but when running the index.html in VS Code, I got a Reference error (DrawFlow not defined):

image

Any idea? Sorry for this beginner question..

yvanblanchard commented 1 month ago

I solved it by modfiying index.html, searching the drawflow.min.js file in 'dist' folder: <script src="dist/drawflow.min.js"></script>

jerosoler commented 1 month ago

Hello,

Are you importing the package? https://github.com/jerosoler/Drawflow?tab=readme-ov-file#import

Or you can see a simple example here with CDN: https://github.com/jerosoler/Drawflow/issues/316#issuecomment-985282224

yvanblanchard commented 1 month ago

@jerosoler I just ran the index.html file from repo 'as it', from VSCode debug. and the relative link to drawflow main js file is not ok for this situation. But of course, following your two solutions work as well! Thank you for your help