shadow-cljs

https://github.com/thheller/shadow-cljs | https://github.com/sponsors/thheller | https://www.patreon.com/thheller
zendevil 2021-03-23T02:51:15.164400Z

I’m trying to load the following in my shadow repl:

(ns humboi.events
  (:require
   [re-frame.core :as rf :refer [reg-event-fx reg-event-db after reg-sub reg-cofx inject-cofx reg-fx]] 
   [reagent.core :as r]
   [re-frame.core :refer [subscribe dispatch]]
   [ajax.edn :as edn]
   [ajax.core :refer [json-response-format raw-response-format json-request-format] :as ajax]
   [day8.re-frame.http-fx]
   [cljs.core.async :refer [go]]
   ))
However, I’m getting this error:
1. Unhandled java.io.FileNotFoundException
   Could not locate day8/re_frame/http_fx__init.class, day8/re_frame/http_fx.clj
   or day8/re_frame/http_fx.cljc on classpath. Please check that namespaces with
   dashes use underscores in the Clojure file name.
why is the repl looking for java files? Why am I on a clojure repl? In the same repl, when I do (shadow/watch :dev) it works and the watch is running smoothly too.

zendevil 2021-03-23T12:07:37.164800Z

@koivistoinen.tuomas when I select the shadow option in cider, and try to run (shadow/watch :dev), I get No available cljs runtime

zendevil 2021-03-23T12:15:34.165100Z

I’m using react-native and yes the react-native app is open

zendevil 2021-03-23T12:22:16.165300Z

how to get the runtime when the build target is react native?

zendevil 2021-03-23T12:24:25.165600Z

nevermind I had to turn on debugging

👌 1
Tuomas 2021-03-23T05:10:56.164500Z

I think it's because the shadow process is a clojure process. In there you can start "watching" a build but if you want to connect to do it, you need to it via (shadow/repl :the-build) Are these of any help to you? https://shadow-cljs.github.io/docs/UsersGuide.html#build-repl https://shadow-cljs.github.io/docs/UsersGuide.html#_clojure_repl https://shadow-cljs.github.io/docs/UsersGuide.html#_nrepl_usage https://shadow-cljs.github.io/docs/UsersGuide.html#_editor_integration

dpsutton 2021-03-23T15:00:03.167400Z

i'm running shadow-cljs run shadow.cljs.build-report app report.html and getting an error:

Caused by:
NoSuchFileException: .shadow-cljs/release-snapshots/app/latest/goog.debug.error.js.map
I've tried created the build both after a compile and a release but get the same error. Project is :npm-module. Anyone ever see anything like this?

dpsutton 2021-03-23T15:12:17.167500Z

thheller 2021-03-23T15:26:33.168300Z

@dpsutton build reports are only supported for :browser builds. doesn't make sense for :npm-module builds since they are "incomplete"

dpsutton 2021-03-23T15:26:57.168700Z

makes sense. thanks @thheller