svg-to-geojson icon indicating copy to clipboard operation
svg-to-geojson copied to clipboard

ReferenceError: SVGPathElement is not defined

Open clarkcb opened this issue 7 years ago • 2 comments

I'm trying to use svg-to-geojson as an npm dependency for a rest application, I'm able to install it using npm install, but when I try to use it using this require:

var svgtogeojson = require('svg-to-geojson');

I get the following error when I try to run the server:

ReferenceError: SVGPathElement is not defined
    at e.svgtogeojson (path/to/geojson-rest/node_modules/svg-to-geojson/dist/svg-to-geojson.min.js:1:23679)
    at Object. (path/to/geojson-rest/node_modules/svg-to-geojson/dist/svg-to-geojson.min.js:2:22430)
    at Module._compile (module.js:570:32)
    at Object.Module._extensions..js (module.js:579:10)
    at Module.load (module.js:487:32)
    at tryModuleLoad (module.js:446:12)
    at Function.Module._load (module.js:438:3)
    at Module.require (module.js:497:17)
    at require (internal/module.js:20:19)

It seems to be an issue related to path-to-polyfill, but I can't figure out how to resolve this.

clarkcb avatar May 16 '17 08:05 clarkcb

same issue for me

Fil avatar Mar 29 '18 10:03 Fil

same issue for me

sarfatyl avatar Dec 16 '20 13:12 sarfatyl