Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issues with runes2 import #270

Closed
peoplenarthax opened this issue Jan 6, 2024 · 7 comments
Closed

Issues with runes2 import #270

peoplenarthax opened this issue Jan 6, 2024 · 7 comments

Comments

@peoplenarthax
Copy link

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

@Earu
Copy link

Earu commented Jan 27, 2024

I have a similar issue:
image

@morkro
Copy link

morkro commented Feb 14, 2024

Bumping this as I am facing the same issue. Using it in the browser using skypack.dev.

@tflemHAK
Copy link

Upgraded package from 3.2.0 to 3.7.2 and I'm getting a similar error.

image

@platdesign
Copy link

same here

@jqn
Copy link

jqn commented Apr 7, 2024

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.

@tcarvalho-mobinteg
Copy link

I have a similar issue: image

I've got this in 3.7.2

Latest version where the issue doesn't occur for me: 3.6.3

@adamgibbons
Copy link
Owner

Should be fixed by #266

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants