Closed cdaein closed 2 years ago
I'm not in front of my computer right now, but I think this could be ES6 imports changing things. The import line might need to be:
const Two = require('two').default;
I'll check and if is the case I'll make a PR.
It was actually an issue with how the build systems changed (from Rollup to esbuild). I just made a patch for it here: https://github.com/jonobr1/two.js/issues/643
You can install the latest npm version, v0.8.10
and it should be resolved. Thanks for sharing! You'll import as you did:
const Two = require('two.js');
I can confirm it works with two.js 0.8.10
on my end.
Thank you very much for the quick fix, and thank you for the beautiful library! 🙏
Trying to use the default two.js template by running:
gives an error:
There must have been some changes in two.js
0.8.x
upgrade because the sketch runs fine with two.js0.7.x
. I am tagging the two.js creator just in case - @jonobr1