Hey folks, just trying get this up and running, but falling at the first hurdle!
installed the package with npm install @svgdotjs/svg.js svgdom
import the package using import { createSVGWindow } from "svgdom";
run with node --experimental-modules index.mjs using Node v12.13.0
get the following error in the terminal:
internal/modules/esm/default_resolve.js:82
let url = moduleWrapResolve(specifier, parentURL);
^
Error: Cannot resolve package exports target 'undefined' matched for '.' in C:\*****\server\node_modules\svgdom\package.json, imported from C:\*****\server\routes\composite\utils.mjs
at Loader.resolve [as _resolve] (internal/modules/esm/default_resolve.js:82:13)
at Loader.resolve (internal/modules/esm/loader.js:73:33)
at Loader.getModuleJob (internal/modules/esm/loader.js:147:40)
at ModuleWrap.<anonymous> (internal/modules/esm/module_job.js:41:40)
at link (internal/modules/esm/module_job.js:40:36) {
code: 'ERR_MODULE_NOT_FOUND'
}
Apologies if this is something glaringly obvious that I'm doing wrong at my end.
Hey folks, just trying get this up and running, but falling at the first hurdle!
npm install @svgdotjs/svg.js svgdom
import { createSVGWindow } from "svgdom";
node --experimental-modules index.mjs
using Node v12.13.0Apologies if this is something glaringly obvious that I'm doing wrong at my end.