Fork me on GitHub

Hi. I'm trying to cache build dependencies for CI. Is there a way to specify another location for the local maven repo directory? Want to download and copy the entire .m2 directory into a container.


shadow creates a local build cache in .shadow-cljs/builds


thanks. i'll look into that

David Pham04:05:15

Anyone managed to get pretty printing working in the repl?


@amar for maven deps you can set :maven {:local-repo "maven"} in either shadow-cljs.edn or ~/.shadow-cljs/config.edn


Thank-you 🙂


hey, can you make `shadow-js` work with `lumo` and get rid of that `JVM` runtime?


can I mimic this JS inheritance in ClojureScript?

class AccessController extends EventEmitter {

  static async create (db, options) {}

  static get type () {
    throw new Error('\'static get type ()\' needs to be defined in the inheriting class')

  get type () { return this.constructor.type }

  async canAppend (entry, identityProvider) {}

class OtherController extends AccessController {

  static get type () { return 'othertype' }

  async canAppend(entry, identityProvider) {
    return true


Seems like in JS parlance static is a property of the object itself and th prototype properties (methods) can be overridden by setting the -.prototype.


What I'm not sure is what the get is, also since AccessController extends EventEmitter what to do with the static properties of EventEmitter, do I just add them to the object literal?


For the former I would do something the lines of:

(defn create-controller []
  (let [type "othertype"
        ac-obj #js {:create (fn [db options]
                              (js/Promise.resolve true))
                    :type type}]

    (set! (.-prototype ac-obj) (.-prototype AccessController))

    (set! (.. CustomAccessController -prototype -type)
          (fn [] type))

    (set! (.. CustomAccessController -prototype -canAppend)
          (fn [entry identity-provider]
            (js/Promise.resolve true)))



answered on SO

👍 4
Chris McCormick06:05:17

can somebody share the link, i would like to read this. thanks!


When using shadow-cljs with aws lambda, anyone got experience with correctly loading in node_modules? I’ve just been getting ImportModuleError. I’ve specifically been trying to use the pg npm module if that helps =)…


Ok, nvm =)… Managed to get it working!


I need to run a bit of my front end code, which includes some native JS react components on my clojure server. The code compiles fine, like I can run it as a stand-alone node script, do I need to figure out how to get it to run on something like GraalVM?


compiling that code for the browser target and trying to run it with Nashorn didn’t work too well


more or less looking to see if anyone else has done something similar


perhaps there’s a shadow namespace I can import on the server, and have it load the compiled node-library and run it?


there is not. nashorn as well as graal.js are rather limited JS engines and they don't support anything async


damn, fwiw it’s just a bit of reagent code (of which wraps a native react component [:> Thing]) I’m I’m returning the string dom representation


so close, but so far

Eric Ihli21:05:58

I'm having a problem with cider-eval-* . I know there's a lot of tools between running that emacs command and shadow-cljs, so maybe this isn't the right place to ask. But I've tracked it down to the nrepl responding with :repl-type of clj in its response map which then gets sent to cider-set-repl-type. I haven't been able to track how :repl-type gets set in the response. Does it have anything to do with shadow-cljs? I'm running npx shadow-cljs server, version 2.8.107 and cider-nrepl 0.25.0-alpha1. After launching npx shadow-cljs server I'm connecting on the default port of 9000 and then running (shadow/repl :main). Everything else works fine. I'm just not able to evaluate stuff from a buffer. The buffer is connected. I've verified that looking at sesman. I put a debug-on-entry on cider-set-repl-type and I see it change from cljs-pending type to clj type on the first attempt at eval. And if I manually set the type back to cljs with (cider-set-repl-type 'cljs, then on the next eval it tries to set it back to clj.


if you set it to cljs and then eval something that is 100% cljs specific like (js/alert "hi") does it still kick it back to `clj?

Eric Ihli21:05:35

Well... shit... I switched to a different project and after manually changing it, it doesn't kick back to clj. It was in a project I was in earlier. I have to run out in 5 minutes so I'll see if I can repro when I get back.

Chris McCormick06:05:17
replied to a thread:answered on SO

can somebody share the link, i would like to read this. thanks!