Fork me on GitHub
Ian Chow04:10:40

Hi, not sure if this is a shadow-cljs specific question but... I'm trying to use a js library but am getting the error message

TypeError: Class constructor _o cannot be invoked without 'new'

(ns myapp.core
  (:require ["@tonejs/piano" :refer (Piano)]))
I had set :compiler-options :output-feature-set to :es6 with no luck. Any help appreciated. Thanks.

Karol Wójcik07:10:48

Which shadow-cljs version?

Ian Chow07:10:41

2.11.4 Other npm packages seem to work fine.


@ianchow hard to say without full stacktrace. looks like it is something internal in the lib. not something you are actually calling from CLJS.

Ian Chow09:10:28

Ah.. ok. Looks like I have to do more digging. Thanks.

Karol Wójcik11:10:07

How can I include refactor-nrepl in shadow-cljs?


same as everywhere else I presume

Karol Wójcik11:10:12

😄 Ok got it working!

Karol Wójcik11:10:37

Last question though. What should I do to access that function? shadow.loader.load_many

Karol Wójcik11:10:54

I'm getting: Uncaught TypeError: shadow.loader.load_many is not a function

Karol Wójcik11:10:42

Module loader has been added to build: :module-loader true

Karol Wójcik11:10:54

Ahh ok. It should load-multiple.


Hello I am trying to connect my chrome extension to the REPL. I can’t connect to that run time and this is the error I get in the websockets tab ["^ ","~:op","~:access-denied"] . Any help would be appreciated.


I am using binaryage/chromex and I have connected to the nrepl server and then I’ve done the (shadow/repl :extension) step where extension is the name of the build.


Nevermind I was able to resolve this

👍 3

Tried :es3, still no luck. IE throws exception about Object.assign.


@jahson you could include the polyfill externally via


or :compiler-options {:force-library-injection ["es6/object/assign"]}


Yeah, but is not an option for me 🙂 Probably I will go with direct require / injection.

Karol Wójcik19:10:53

@jahson you know that you can download full polyfill bundle?


@thheller Thank you for your help anyway.


@karol.wojcik Yeah, I've done polyfills many times in JS, just never did with ClojureScript.


Just wanted to make it more elegant 😉

👍 3