Hi
Apologies, my javascript is very poor, but I've run in to a problem that I don't understand how to get past.
That's all fine, and I used yarn to add a dependency on the latest version of vexflow. So good so far.
But then trying to use vexflow, I get a compile error when the project builds:
×
TypeError: this.element.appendChild is not a function. (In 'this.element.appendChild(svg)', 'this.element.appendChild' is undefined)
SVGContext
3604 | this.svgNS = 'http://www.w3.org/2000/svg';
3605 | var svg = this.create('svg');
3606 | // Add it to the canvas:
> 3607 | this.element.appendChild(svg);
3608 |
3609 | // Point to it:
3610 | this.svg = svg;
View compiled
There are a bunch more errors; this is just the first.
What I _suspect_ is going on is that web pack is trying to compile the vexflow js, and is missing either the required dependencies or build configuration to do so. I've tried adding vexflow's devDependencies to my own project, but with no luck.
Has anyone else done anything similar, or could suggest what I could do to work out what the problem is?
Many thanks.