-
Notifications
You must be signed in to change notification settings - Fork 668
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error: Dot.buildAndAttach is not a function #1630
Comments
You really need to share some code with us on a fiddle or something. buildAndAttach is a static method of Dot, so make sure you import {Dot}. |
Here's the relevant code as copied from my project, with the difference that I import from https://jsfiddle.net/adzty1kf/ In my project I import via:
instead of:
The fiddle works, though, and in fact, when I use the second variant in my project, it works as well ... so maybe there's something broken in the npm release ? EDIT: everything else works as expected when importing via the |
When I look in 'vexflow-min.js', I see this at the end:
So that is likely your issue. Use the build/cjs version of vexflow.js or vexflow-debug.js |
hmm that's odd, as I'm using a package from npm that has only been created about a month ago, as indicated in this comment: It's marked in npm as version 4.2.5 --> https://www.npmjs.com/package/vexflow4 In my
So if |
The code and versions in build directory are 4.2.5. The releases directory is pre-built. I think they keep some older version around for the visual regression tests, or maybe it was an oversight (maybe @ronyeh has an idea). I think in all cases you want to use one of the packages in /build/cjs, as this would have been build with latest source code. |
Hello @AaronDavidNewman and @the-drunk-coder, Sorry for the confusion! Yes, we had been keeping around the legacy version of VexFlow (v 3.0.9) in the releases/ directory. This was because some old websites and old JSFiddles that depended on v3.0.9 linked directly to: If we had removed the releases/ directly when we published v4.x, we would have broken those old sites. Even if we put v4.x into the Yes, it's confusing that we ship the legacy version alongside the current one in the build/ directory. 4.x has been out long enough now (and we're working on 5.x). I think it's time we remove that releases/ folder. It's OK if those older JSFiddles break. :-) I'll introduce a PR to remove the releases/ folder from the NPM package. |
Hi,
I'm trying to draw dotted notes, but somehow I'm getting an error that
Not sure how to fix this ... I'm on latest Vexflow 4, using the
vexfow4
package from npm ...The text was updated successfully, but these errors were encountered: