-
Notifications
You must be signed in to change notification settings - Fork 405
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
NodeJS Canvas is not a constructor #232
Comments
i got same error and idk how to solve it |
+1 |
@safoine27 @Badvillain01 @NiteshSaxena replace in caman.full.js line no: 371 |
@bhavyasanchaniya...How?..installed it through npm |
@Badvillain01 How did you install Camanjs through npm? I have been trying to do the same with no success even though I have also installed all the addition dependency mentioned(node-gyp & Installing GTK 2). |
Hi folks! I'm thrilled to say that I have solved this error. I was lucky enough to have a working version from a while ago, and my Caman stuff was breaking while I was trying to modernize my script, so I compared the difference. The difference was actually the canvas package that Caman relies upon. If you don't specify the version in your package.json, Caman will go and download the latest (2.5.x at time of this message), however this version does not work with Caman. As far as I can tell, you need to choose a 1.x version of the canvas package. So, make sure you add "canvas" as a dependency in your package.json, and restrict the version to 1.6.x. So, for example:
... and you should be good to go!! |
Yes you will get warnings spit to screen about deprecations in the old Canvas package, but I can confirm all this works on Node 8.x.x |
Works but this is not suitable solution. |
You can use my package where i fixed the problem by changing the line: Just replace the original caman with this line: |
Hi ,
I am getting error - |
My package.json -
|
I tried running the example of NodeJS but it kept giving me this error
and it gave me this error
The text was updated successfully, but these errors were encountered: