This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2022-10-26
Channels
- # announcements (17)
- # babashka (68)
- # beginners (8)
- # biff (14)
- # calva (25)
- # cherry (10)
- # clj-kondo (1)
- # clj-on-windows (12)
- # cljsrn (6)
- # clojure (134)
- # clojure-berlin (1)
- # clojure-europe (33)
- # clojure-nl (4)
- # clojure-norway (6)
- # clojure-uk (10)
- # clojurescript (9)
- # datalevin (8)
- # datomic (34)
- # docker (1)
- # emacs (31)
- # fulcro (6)
- # honeysql (8)
- # java (7)
- # joyride (14)
- # kaocha (7)
- # malli (11)
- # nbb (4)
- # off-topic (11)
- # pedestal (14)
- # rdf (53)
- # re-frame (6)
- # reagent (39)
- # reitit (2)
- # releases (9)
- # rewrite-clj (14)
- # shadow-cljs (97)
- # specter (1)
- # testing (5)
- # tools-deps (12)
- # vim (4)
- # xtdb (9)
Hello, I am trying to run a Krell instance to experiment with CLJS/React Native. I have been following this tutorial : [https://github.com/vouch-opensource/krell/wiki/Reagent-Tutorial](https://github.com/vouch-opensource/krell/wiki/Reagent-Tutorial) When I try to do an android or ios build I get this error :
BUNDLE ./index.js
error: Error: Unable to resolve module react/jsx-runtime from /Users/dedegogo/workspaces/react-native-apps/lnd/index.js: react/jsx-runtime could not be found within the project or in these directories:
node_modules
> 1 | /* Generated by Krell, do not edit by hand */
2 |
3 | import React from 'react';
4 | import {
at ModuleResolver.resolveDependency (/Users/dedegogo/workspaces/react-native-apps/lnd/node_modules/metro/src/node-haste/DependencyGraph/ModuleResolution.js:178:15)
...
If I understand correctly the dependencies have not been installed (since they are not found)
What should I do in order to resolve these dependencies issues?
This is what I did :
To install my dependencies I followed the tutorial:
first I tried
clj -M -m cljs.main --install-deps
But it does not work. I get a depenency error, where it tries to find the latest react (18) but it only finds v.16.
I also tried the same command with -Srepo but that did not change anything
(my ~/.clojure/deps.edn is all commented text)
So I tried this way as indicated:
yarn install
which installs some depndencies, then
clj -M -m cljs.main -co "{:deps-cmd \"yarn\"}" --install-deps
which does not return an error but does not print anything else in the console
for info I have tried doing this with node 16 and 18 and npm 8.1.2 and 8.19.2 respectively. But I keep having the same errors when I try to install the deps using npm.What happens if you stop before the ClojureScript step and try to run the app as a plain JS project?
Also there’s a template here that should set everything up for you, you could give it a try as well: https://github.com/joshuamiller/react-native-template-cljs-krell-storybook
Thank you Josh, I tried the template and after some fiddling it worked great. It’s also great that you implemented storybook into the project as that is something I want to experiment with and learn too. Now that the pipes are working, I just have to learn react-native and figure out how it all works together.
When I try the app as a plain JS project it worked fine. I also tried adding the dependencies manually and that led me to another error message :
LOG Running "test" with {"rootTag":1,"initialProps":{}}
ERROR Error: @react-native-community/react-native-device-info: NativeModule.RNDeviceInfo is null. To fix this issue try these steps:
• For react-native <= 0.59: Run `react-native link react-native-device-info` in the project root.
• Rebuild and re-run the app.
• If you are using CocoaPods on iOS, run `pod install` in the `ios` directory and then rebuild and re-run the app. You may also need to re-open Xcode to get the new pods.
If none of these fix the issue, please open an issue on the Github repository: , js engine: hermes
at KrellRoot ()
at RCTView
at View
at RCTView
at View
at AppContainer ()
at test(RootComponent) ()
ERROR TypeError: Cannot read property 'krellUpdateRoot' of undefined
This error is located at:
in KrellRoot
in RCTView (created by View)
in View (created by AppContainer)
in RCTView (created by View)
in View (created by AppContainer)
in AppContainer
in test(RootComponent), js engine: hermes
ERROR TypeError: Cannot read property 'krellUpdateRoot' of undefined
This error is located at:
in KrellRoot
in RCTView (created by View)
in View (created by AppContainer)
in RCTView (created by View)
in View (created by AppContainer)
in AppContainer
in test(RootComponent), js engine: hermes
but then I saw your message. I will try to get it working or file a bug report to krell.