Fork me on GitHub
#cljsrn
<
2019-11-23
>
Prometheus15:11:51

How come I get an error with cljs-http not found after adding it to project.clj and running lein deps, in a re-natal project. Am I missing something, can’t I use cljs-libraries in re-natal for some reason?

dotemacs16:11:19

What steps did you do exactly? What is the exact error?

Prometheus16:11:54

No such namespace: cljs-http.client, could not locate cljs_http/client.cljs, cljs_http/client.cljc, or JavaScript source providing "cljs-http.client" (Please check that namespaces with dashes use underscores in the ClojureScript file name) 

dotemacs16:11:36

That’s a partial answer to the second question of mine

Prometheus16:11:17

it happened once I used it in my api namespace

...(:require [cljs-http.client :as http]...

Prometheus16:11:24

@U3SG7RX7A

Figwheel: Stopped watching build - ios
Figwheel: Reloading build config information
Figwheel: Cleaning build - ios
Figwheel: Watching build - ios
Figwheel: Cleaning build - ios
Compiling build :ios to "target/ios/index.js" from ["src" "env/dev"]...
Failed to compile build :ios from ["src" "env/dev"] in 10.345 seconds.
----  Could not Analyze  src/events_fe/api/auth_api.cljs  ----

  No such namespace: cljs-http.client, could not locate cljs_http/client.cljs, cljs_http/client.cljc, or JavaScript source providing "cljs-http.client" (Please check that namespaces with dashes use underscores in the ClojureScript file name) 

----  Analysis Error : Please see src/events_fe/api/auth_api.cljs  ----
Figwheel: initial compile failed - outputting temporary helper application to target/ios/index.js

Prometheus16:11:44

1. added it to dependencies in project.clj

Prometheus16:11:21

2. required it 3. reloaded config from a cider repl 4. got error

dotemacs16:11:22

cljs-http does work with react-native as can be seen from the unrelated discussion above. Maybe stop your REPL at the step 3. & start it again, so that it can pick up the dependency?

😀 4
Prometheus16:11:40

@U3SG7RX7A damn, it worked! thank you so much, it’s my first time dabbling with re-natal and also trying out cider repl for a change.

👍 4
🙂 4
Prometheus16:11:14

I thought I only needed to run reload-config, but I apparently needed to restart the whole repl