cljsrn

Gabriele Lippi 2024-11-14T14:57:10.065799Z

Hello, I'm using the latest version of krell and react-native 0.75.4, I'm trying to reference code from https://github.com/wix/react-native-calendars but I get the error in the screenshot; I saw that previously in the chat someone suggested to edit the main field of the package.json of node_modules/react-native-calendars from index.ts to index.js but it doesn't seem to fix the issue for me and seems also a bit buggy. Any idea on what it the problem and if is there a fix for this situation?

joshmiller 2024-11-15T16:21:29.986289Z

What does your require look like in your namespaces declaration in cljs?

Gabriele Lippi 2024-11-15T16:32:26.150759Z

hey @joshmiller thanks for replying! My require is like this

(:require
   [react-native-calendars :as react-native-calendars])

joshmiller 2024-11-15T16:35:40.588619Z

Maybe put it in quotes, (`”react-native-calendars”`)? Also you have rebuilt with krell after adding it?

Gabriele Lippi 2024-11-15T16:36:24.856979Z

I'm afraid that I tried that already but it didn't solve the issue, anyway I'm going to try right now again

Gabriele Lippi 2024-11-15T16:37:16.257589Z

about rebuild krell, do you mean to run clj -M -m krell.main -co build.edn -c -r again?

👍 1
joshmiller 2024-11-15T16:38:42.622299Z

If that doesn’t work, also check what (js/require “react-native-calendars”) from the cljs repl gives you

👀 1
Gabriele Lippi 2024-11-15T16:40:49.472289Z

Gabriele Lippi 2024-11-15T16:41:39.370809Z

I get nil . I'll try to setup a new project from zero with just react-native-calendars dep just to see if in that case it works

👍 1
Gabriele Lippi 2024-11-15T17:05:30.667409Z

I just tried with a new repo with only react-native-calendars dependency and the issue is still there, could it make sense if I open an issue with a link to the repo on krell repo?

👍 1
joshmiller 2024-11-15T17:07:11.125529Z

I don’t think Krell will do anything without actually diagnosing an issue. Can you put that repo up on GitHub and link me? I’m on a plane right now but I’ll see if I can see what is going on there.

👍 1
Gabriele Lippi 2024-11-15T17:07:49.846499Z

sure and thanks!

👍 1
Gabriele Lippi 2024-11-15T17:28:57.730459Z

here it is https://github.com/glippi/krell-calendars

Gabriele Lippi 2024-11-15T17:35:36.947289Z

fyi @joshmiller I'll log off now so if I don't reply is for this reason. I'll be back on Monday, I'm not sure if I'll log in in the weekend. Thank you very much again for looking into this weird issue, hopefully we'll figure out what's the problem soon ;)

👍 1
joshmiller 2024-11-15T17:36:24.377089Z

Great, enjoy your weekend.

🙏 1
Gabriele Lippi 2024-11-22T09:20:08.208649Z

I see, thank you very much!

👍 1
joshmiller 2024-11-19T20:04:17.107329Z

@gabriele.lippi91

joshmiller 2024-11-19T20:04:36.792549Z

Steps: 1. Check out that repo 2. yarn install 3. Edit package.json in node_modules/react-native-calendars to reference index.js instead of index.ts 4. npx pod-install 5. clj -M -m krell.main -co build.edn -c -r 6. yarn ios

Gabriele Lippi 2024-11-21T14:27:42.719459Z

@joshmiller thank you very much! Do you know why it's needed to change index.ts to index.js ?

joshmiller 2024-11-21T17:37:36.111859Z

I haven’t dug down to actually fix this when it comes up yet, but I believe it’s because the Closure compiler doesn’t understand TypeScript and at this stage of development we haven’t passed through the Metro bundler yet.

joshmiller 2024-11-21T17:39:14.874849Z

I think most TS-built projects go through a compile step and point to index.js, not sure why there are a couple that do not