Weave.js

Setup

Weave.js SDK API setup

Dependencies

This package is dependant on:

Server-side rendering backends

On the server, Konva renders through a native canvas implementation. The @inditextech/weave-sdk/server entry point offers two backends, and each one needs its own native package:

Backend setup Required package

setupCanvasBackend()

canvas

setupSkiaBackend()

skia-canvas

Both packages are optional peer dependencies of the SDK: npm doesn’t install them, and it doesn’t warn when they are missing. Install only the one for the backend you use, with the version that @inditextech/weave-sdk requires, for example:

npm install canvas

If the package is missing, the setup function throws an error that names the package to install. Browser applications don’t need either package.

Installation

npm install @inditextech/weave-sdk

All Weave.js packages are published as ES modules only. Use import to load them. Loading them with require() from CommonJS code needs Node.js 20.19+ or 22.12+, the versions that support require() of ES modules.