You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, after a classic install of canvas 2.5.0 from npm, require('canvas') is not working:
TypeError: bindings.CanvasRenderingContext2dInit is not a function
at Object.<anonymous> (/mypath/node_modules/canvas/lib/context2d.js:13:10)
at Module._compile (module.js:653:30)
at Object.Module._extensions..js (module.js:664:10)
at Module.load (module.js:566:32)
at tryModuleLoad (module.js:506:12)
at Function.Module._load (module.js:498:3)
at Module.require (module.js:597:17)
Issue or Feature
Investigating this, i found that requiring canvas/build/Release/canvas.node would give the following result:
This might be a variant of #1250 (mismatch of JS and C++ code). You seem to have JS from version 2.2 or later, and C++ from pre-2.2. Can you try a totally from-scratch install (delete node_modules)?
I have the same issue now with the newest version.
TypeError: bindings.CanvasRenderingContext2dInit is not a function
at Object.../../node_modules/canvas/lib/context2d.js (/mypath/node_modules/canvas/lib/context2d.js:13:1)
Currently, after a classic install of canvas 2.5.0 from npm, require('canvas') is not working:
Issue or Feature
Investigating this, i found that requiring canvas/build/Release/canvas.node would give the following result:
What's expected from this is the CanvasRenderingContext2dInit method but the object only provide a CanvasRenderingContext2d
Steps to Reproduce
Just install and require canvas with my environment.
Your Environment
canvas 2.5.0
node 8.15.0
Linux 4.20
The text was updated successfully, but these errors were encountered: