Fork me on GitHub
#shadow-cljs
<
2022-02-16
>
Jimmy Miller16:02:13

So I'm trying to use :npm-module and running into this issue https://github.com/thheller/shadow-cljs/issues/908 Except mine is

internal module error, no mod for dep:[:shadow.build.classpath/resource "goog/promise/promise.js"]
{:dep [:shadow.build.classpath/resource "goog/promise/promise.js"]}
ExceptionInfo: internal module error, no mod for dep:[:shadow.build.classpath/resource "goog/promise/promise.js"]
Happy to try to work on a reproducing case. Just wanted to see given its similarity to the existing issue if there is anything I should be looking at or could possibly do to fix the issue. (Sadly :node-library is not an option and one of my deps doesn't play well with :esm.)

thheller18:02:15

@jimmy which shadow-cljs version is this? this shouldn't be an issue with any not super old version?

thheller18:02:52

the issue you linked has the fix?

Jimmy Miller18:02:05

Sorry for the bother. I had checked I was on the latest version. But did not notice that someone was overriding the version in the alias I was using to build this. Works fine on the latest version. Thanks

mauricio.szabo22:02:55

Hi, @thheller. I'm trying to use defclass from your shadow.cljs.modern namespace, but I keep getting errors like "cannot infer target on expression". For example, at this code:

(modern/defclass TextEditor
  (constructor [this params])
  Object
  (sommething [this]))

mauricio.szabo22:02:09

I get:

Cannot infer target type in expression (. (. TextEditor -prototype) -sommething)

thheller05:02:24

yeah, still need to sort out some edge cases. you can just (set! *warn-on-infer* false) before the defclass and back to true after