Closed Inventsable closed 4 years ago
seems like the bundler is attempting to load root.Image
first thing: run ./node_modules/mocha/bin/mocha
from the root. If this is successful, the library works, but there is an issue with your bundler configuration. (I have not used it in Vue, but have used it with webpack)
The error is on this line: https://github.com/khrome/ascii-art-image/blob/master/image.js#L19
and in that context it expects root
to be window from the passing of this
at the root context
https://github.com/khrome/ascii-art-image/blob/master/image.js#L61
seems like your loader is recontexting the loading block so that this
is something else than window
Please report back
Thanks!
Thanks for the prompt reply!
I'm not too experienced so I assumed you meant to run node ./node_modules/mocha/bin/mocha
, but in looking I didn't have ./node_modules/mocha
at all so I installed it via npm but in using node ./node_modules/mocha/bin/mocha
I get this:
Error: No test files found: "test"
My setup is using Quasar-CLI which internally uses Webpack, and is something of a wrapper for merging Vue and Webpack as an alternative to Vue-CLI, though I'm able to manually configure Webpack in any way I'd need. I'm unsure if I missed an install step somewhere here, and with your mention of this
-- within a .vue
file, the scope of this
is referring to the Vue component itself but I'm unsure if that's relevant here?
I can provide a demo repo for you with this setup on request, let me know if I can do anything else! I'd really love to put this kind of functionality inside of Adobe apps and allow graphic designers/illustrators to instantly convert their art to ASCII.
a demo repo would help.
please reopen if you continue work on this.
Hello, I'd love to create a panel for Adobe Illustrator and Photoshop which uses this module internally, and in following the code found in image-core:
Like so:
Or:
I get an error claiming
root.Image
is not a constructor:I've tried making sure to install canvas and reinstall both
ascii-art
orascii-art-image
, but am unsure of what to do here. Can the documentation be updated or I be corrected on how to do this?