TypeError: svgToPath is not a function
ashishepost opened this issue · comments
When I am tring to execute example code get this error
Hi @ashishepost, thanks for open the Issue.
Could you please share a little more information?
Here is the working example. Feel free to tweak that sandbox to show where is the error you are getting.
@elrumordelaluz (node:19393) UnhandledPromiseRejectionWarning: TypeError: svgToPath is not a function
when I try to require
the package in my node environment.
Node version: v12.16.1
I temporary fixed this by changing the last line in dist\pathThatSvg.cjs.js
from
exports.default = indexEs;
to
module.exports = indexEs;
Hope the info helps.
You could import the package as
const svgToPath = require("path-that-svg").default;
or updating to v1.2.4
as a named import like
const { pathThatSvg } = require("path-that-svg");
Thanks Sir
On Sun, 3 May 2020 at 7:48 PM, Lionel ***@***.***> wrote:
Closed #2 <#2>.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#2 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AE76C5VZB6NIU4OJEBJYBQDRPV4LVANCNFSM4LCDOAMQ>
.
--
Regards
Ashish