Closed wisyr closed 5 years ago
If you're using this for SSR, I assume you're going to be outputting SVG rather than <canvas>
, right?
This looks like an issue with the node-canvas dependency, which is only needed if you're trying to render to <canvas>
or PNG. If you're outputting to SVG, just don't install node-canvas and you should be fine.
If this is happening without the canvas
package in your dependencies list, then I'm going to need more information about the specific OS version you're trying to install on so I can attempt to reproduce.
I did a workaround. Since I'm not using trianglify on server side, I have made a conditional import using require. If client, require trianglify, if server - do not import anything.
And actually it worked. One more thing though - the dependency on server side has to be placed inside devDependencies
, else it will drop the npm install with multiple errors.
P.S. Thank you for an outstanding library. This is a pure gold.
While installing trianglify on node (ver 8.11.4) for Server Side Rendering purposes, I'm getting numerous warnings and errors in the console, related with e.g.
node-pre-gyp
,node-gyp
etc. It happens in linux console. However it works properly locally, on node 8.11.1 on windows.Is it the fault of the dependencies, which trianglify is using? LF solution.
Currently I'm unable to use this lib in my project, unfortunately.