Fork me on GitHub
#leiningen
<
2017-11-14
>
derpocious05:11:14

Hey all, I'm having trouble loading a namespace and calling a function from the repl

derpocious05:11:28

Here is my sole clore.cljs file

derpocious05:11:41

(ns my-service-cljs.core
  (:require [cljs-lambda.macros :refer-macros [defgateway]]
            [cljsjs.firebase]))

(defgateway echo [event ctx]
  (println "ok then");
  {:status  200
   :headers {:content-type (-> event :headers :content-type)}
   :body    (event :body)})

derpocious05:11:35

I tried (load "my-service-cljs.core"), (load "my_service_cljs/core"), (load-namespace ...)

derpocious05:11:39

Does anyone know the correct expression to load namespace, and does the specific current directory I'm matter or is it always relative to the project root?

gfredericks12:11:46

I'm not sure clojurescript lets you load files

gfredericks12:11:23

is there something wrong with (require 'my-service-cljs.core)?

derpocious12:11:59

thanks, but require doesn't work in the repl either

derpocious12:11:01

FileNotFoundException Could not locate core'init.class or core'.clj on classpath. clojure.lang.RT.load (RT.java:456)

gfredericks12:11:28

did you put a quote at the end of it too?

gfredericks12:11:22

the error message suggests you did

derpocious13:11:01

no, I put it in exactly as you said

gfredericks13:11:33

the single-quote in your error message is pretty misleading then

derpocious14:11:58

I tried it many times with and without the quote

derpocious14:11:26

On either side

madstap15:11:41

Just to be clear, in (ns foo.core (:require [bar.core])) there should be no quotes, and in (require '[bar.core]) there should be one quote on the left.

derpocious15:11:24

Thanks, it's that meant for repl or a cljs file?

madstap16:11:51

Usually you'll have the first version in a file and the second at the repl

pesterhazy15:11:54

Anyone else seeing random maven cert issues on CircleCI?

Could not transfer artifact joda-time:joda-time:jar:2.7 from/to central (): Certificate for <repo1.maven.org> doesn't match any of the subject alternative names: []

cjsauer16:11:43

Was seeing those yesterday. Looks like it might still be happening.

pesterhazy16:11:16

@cjsauer thanks for the link, that must be it. It's intermittent

pesterhazy16:11:59

I added a comment to their Jira (only took me 15 min to sign up)

Komcrad20:11:03

Anyone having issues with lein connecting to nexus.cns.vt edu?

Komcrad21:11:56

Could not transfer artifact net.percederberg:mibble-parser:pom:2.9.3 from/to mibble (https://nexus.cns.vt.edu/nexus/content/groups/public/): Network is unreachable (connect failed)

danielcompton21:11:15

I can't reach it here

Mudge22:11:44

Is there a way to run lein tasks from the repl?