svgdotjs / svg.js

The lightweight library for manipulating and animating SVG
https://svgjs.dev
Other
10.95k stars 1.07k forks source link

npm install for nodejs #1299

Closed maxwowpow closed 10 months ago

maxwowpow commented 1 year ago

Bug report

Error [ERR_MODULE_NOT_FOUND]: Cannot find package 'XXX\node_modules\@svgdotjs\svg.js\' imported from app.js
    at new NodeError (node:internal/errors:399:5)
    at legacyMainResolve (node:internal/modules/esm/resolve:202:9)

Explanation

Fuzzyma commented 10 months ago

Cant reproduce. My package.json has

{
  "devDependencies": {
    "@svgdotjs/svg.js": "^3.2.0"
  }
}

and i simply write

const { SVG, registerWindow } = require('@svgdotjs/svg.js')

and it works. Closing this as not reproducible