Comments (2)
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.
from trianglify.
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.
from trianglify.
Related Issues (20)
- Cannot Install on Windows through NPM HOT 2
- Error running install script for optional dependency HOT 2
- Error with newer versions of canvas: Object.render_png HOT 1
- Where is the 2.0 code? HOT 1
- Trianglify "next" milestone
- The canvas module is outdated HOT 2
- Option to Choose Color Format HOT 2
- Non-minified javascript bundle creation? HOT 4
- Feature Proposal: Web Worker support/example
- Upload prebuilt .zip files to the Releases tab
- Trianglify not working in iOS 10 on ipad HOT 3
- colours more random? HOT 1
- Passing destSVG to pattern.toSVG() does not work; implementation is missing 🤦♂️ HOT 5
- Uncouple from node-canvas. HOT 12
- Upgrade cell generation algorithm
- CLI version of trianglify
- Error in production on vue, vite HOT 1
- replacement of trianglify.io HOT 1
- Making this into an Illustrator Script HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from trianglify.