cljsrn

Zeniten 2022-06-06T09:49:41.645249Z

I'm having an issue when adding new JavaScript components, @joshmiller. I've added an issue: https://github.com/joshuamiller/react-native-template-cljs-krell-storybook/issues/1 (It seems very similar to this: https://github.com/vouch-opensource/krell/issues/142)

Zeniten 2022-06-07T19:46:42.277069Z

I've installed Watchman, and tried again, but unfortunately the issue is still there. 😞

joshmiller 2022-06-07T23:44:18.175169Z

@larskristian.marontel Good news, bad news. I checked out the latest version of your repo and it ran fine for me:

πŸ‘ 1
joshmiller 2022-06-07T23:45:08.509089Z

I’m on macOS, so it’s very possible there’s some OS-level difference here.

πŸ‘ 1
joshmiller 2022-06-07T23:54:59.611049Z

Actually, I will say, it may be worth checking out your β€œbroken” repo into a new directory and trying to run it from there. I once solved a bundler issue by doing that even after all the cache-clearing instructions failed.

joshmiller 2022-06-06T15:37:17.535529Z

Did you see the issue on just the bare skeleton, or did it only happen when you added a second component?

joshmiller 2022-06-06T15:37:43.653369Z

I would definitely try to rm -rf node_modules && yarn install and try again as well.

Zeniten 2022-06-06T15:45:47.815599Z

I've done a couple of other things as well, like adding a newer version of react-native-tcp-socket (https://github.com/vouch-opensource/krell/issues/148), and making some changes to styling. I've tried removing node_modules and running yarn install, and it seems to remove the error, but I then had problems with Metro/REPL not picking up changes. I was able to get everything to work again by reinstalling the REPL dependencies (`clj -M -m cljs.main -co "{:deps-cmd \"yarn\"}" --install-deps`), but that is quite cumbersome, and it appears I get the mentioned error again if I add another JS component.

joshmiller 2022-06-06T15:47:42.498319Z

I believe when you do that reinstalling REPL deps step, it’s actually going to overwrite your upgraded react-native-tcp-socket version, along with possibly your react-native version, so I would double-check that.

Zeniten 2022-06-06T15:48:24.711319Z

Yeah, it does, so I also did upgrade that specific library afterwards.

joshmiller 2022-06-06T15:48:38.015169Z

I’m not surprised about the error itself, but more surprised that you have it working, then you add a component, and then it fails.

Zeniten 2022-06-06T15:48:42.090669Z

Here's my story so far: https://github.com/Zeniten/rn-krell-storybook

πŸ‘ 1
Zeniten 2022-06-06T15:49:04.951919Z

(Before I tried adding another component, that is.)

πŸ‘ 1
Zeniten 2022-06-06T15:54:36.629829Z

Oh, btw, I had trouble installing Watchman when setting up RN, so I skipped that. I'm quite new to RN, so I'm not sure how crucial it is.

joshmiller 2022-06-06T15:55:49.628129Z

Oh, that might be an issue. Watchman is what the bundler uses to detect new changes and include them in the build. It might not be picking up your new component.

πŸ‘ 1
joshmiller 2022-06-06T15:57:07.825519Z

If you have a working project and add a component to it, can you try quitting everything, then running yarn run-android and clj -M -m krell.main -co build.edn -c -r again?

πŸ‘ 1
Zeniten 2022-06-06T16:08:43.524059Z

Yeah, got the error.

Zeniten 2022-06-06T16:09:47.066099Z

Ah, I forgot to rename the component this time. 1 sec.

joshmiller 2022-06-06T16:10:05.361559Z

Hm, one thing you should definitely change is that you’re nesting a Text component inside another Text

Zeniten 2022-06-06T16:10:24.004559Z

I'll fix that too, and check.

πŸ‘ 1
Zeniten 2022-06-06T16:17:07.856579Z

I guess trying to get Watchman set up would be a nice next step. Also, I could try making changes in another editor. I've had some issues with Emacs and temporary files in the past.

πŸ‘ 1
joshmiller 2022-06-06T16:17:25.498469Z

What does target/krell_npm_deps.js look like?

Zeniten 2022-06-06T16:17:51.119699Z

module.exports = {
  krellNpmDeps: {
    "../js/Welcome.js": require('../js/Welcome.js'),
    "../js/Component.js": require('../js/Component.js')  }
};

joshmiller 2022-06-06T16:18:09.238199Z

Ok, so it looks like Krell is properly picking up your JS

πŸ‘ 1
Zeniten 2022-06-06T17:18:28.999949Z

I just tried making changes in VS Code. It didn't affect the issue.

Zeniten 2022-06-06T17:19:07.348669Z

I'll try getting Watchman up an running sometime later.

πŸ‘ 1
Zeniten 2022-06-09T13:06:21.928109Z

Bah, cloning into a new directory didn't solve it. I guess it's the OS then, or my previous history with mucking about with this install.

Zeniten 2022-06-09T19:45:44.538879Z

Thanks for all your input, though, Josh! πŸ™‚

joshmiller 2022-06-09T19:47:13.692009Z

No problem! Sorry it's not working. Let me know if you give it another shot and want a hand.

πŸ‘ 1
Zeniten 2022-06-08T10:16:11.347589Z

Alright, I'll try that.