ics
ics copied to clipboard
Issues with runes2 import
Info:
React application w/o Typescript
node version: 18.19.0
"dependencies": {
"ics": "3.5.0",
"react": "^17.0.0",
"react-dom": "^17.0.0",
"react-scripts": "5.0.1",
"styled-components": "^6.1.6",
},
When running createEvents
(I presume is the same issue with createEvent
or anything that calls fold-line
), it always returns error:
TypeError: (0 , _runes.default) is not a function
at foldLine (fold-line.js:12:1)
at formatHeader (format.js:21:1)
at run (index.js:56:1)
at Object.createEvents (index.js:75:1)
at EventsManager.toICS (index.js:54:1)
at createICS (App.js:48:1)
at HTMLUnknownElement.callCallback (react-dom.development.js:3945:1)
at Object.invokeGuardedCallbackDev (react-dom.development.js:3994:1)
at invokeGuardedCallback (react-dom.development.js:4056:1)
at invokeGuardedCallbackAndCatchFirstError (react-dom.development.js:4070:1)
And it is because _runes
after resolving import looks like this:
{
"default": "/static/media/index.17ec02c86117f90a327b.cjs"
}
I guess it has to do with resolving CJS instead of ESM in the build.
I believe there should be a way of fixing this by fixing how the build is done
I have a similar issue:
Bumping this as I am facing the same issue. Using it in the browser using skypack.dev.
Upgraded package from 3.2.0 to 3.7.2 and I'm getting a similar error.
same here
ics version 2.44.0 is working for me and it would be great if the maintainer merges the existing PR to fix this issue, thanks in advance.
I have a similar issue:
I've got this in 3.7.2
Latest version where the issue doesn't occur for me: 3.6.3
Should be fixed by #266