Hi, not sure if this is a shadow-cljs specific question but... I'm trying to use a js library https://github.com/tambien/Piano but am getting the error message
TypeError: Class constructor _o cannot be invoked without 'new'
(ns myapp.core
(:require ["@tonejs/piano" :refer (Piano)]))
(Piano.)
I had set :compiler-options :output-feature-set to :es6 with no luck. Any help appreciated. Thanks.Which shadow-cljs version?
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.
Ah.. ok. Looks like I have to do more digging. Thanks.
How can I include refactor-nrepl in shadow-cljs?
same as everywhere else I presume
😄 Ok got it working!
Last question though. What should I do to access that function? shadow.loader.load_many
I'm getting: Uncaught TypeError: shadow.loader.load_many is not a function
Module loader has been added to build: :module-loader true
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
Tried :es3
, still no luck. IE throws exception about Object.assign
.
@jahson you could include the polyfill externally via https://polyfill.io/v3/
or :compiler-options {:force-library-injection ["es6/object/assign"]}
Yeah, but http://polyfill.io is not an option for me 🙂 Probably I will go with direct require / injection.
@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 😉