Code Monkey home page Code Monkey logo

Comments (2)

qrohlf avatar qrohlf commented on August 15, 2024

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.

wisyr avatar wisyr commented on August 15, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.