Skip to content
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

Add canvas as dependency. #36

Closed
wants to merge 8 commits into from
Closed

Conversation

DeviousM
Copy link

@DeviousM DeviousM commented Dec 2, 2020

As JSDOM requires canvas as a dependency while creating a production build, we need it as a dependency (as JSDOM has it as a peer dependency).

@DeviousM DeviousM mentioned this pull request Dec 2, 2020
@kkomelin
Copy link
Owner

kkomelin commented Dec 2, 2020

Hi @DeviousM,
Thanks for the PR. Will review it in my spare time.
I have a quick questions right now though, why the version is 0.9.3 right after 0.9.0? I think we could have a minor version increase for new dependencies instead, something like 0.10.0. What do you think?

@kkomelin kkomelin added bug Something isn't working dependencies Pull requests that update a dependency file labels Dec 2, 2020
@DeviousM
Copy link
Author

DeviousM commented Dec 2, 2020

Hi! Sorry, this is actually a bit more complex as canvas as a dependency is sooo fucked up that as you can see I'm currently trying to figure out why is it so bad. The thing is that when it's running the newest version it's doing this on the SSR:

TypeError: bindings.CanvasRenderingContext2dInit is not a function
at Object.../../node_modules/canvas/lib/context2d.js (/project_name/node_modules/canvas/lib/context2d.js:13:1)

@kkomelin
Copy link
Owner

kkomelin commented Dec 2, 2020

Yes, I agree, the way JSDOM requires/includes Canvas is not straightforward. Good luck with your debug/investigation! Let me know if I can help with anything.

@DeviousM
Copy link
Author

Unfortunately I was not able to make it work, dependencies were all too tangled up for me to resolve them properly and I was not able to make it work in an SSR environment as it ended up blowing up in my face on every attempt.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working dependencies Pull requests that update a dependency file
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants