shadow-cljs

https://github.com/thheller/shadow-cljs | https://github.com/sponsors/thheller | https://www.patreon.com/thheller
zhuxun2 2020-11-17T03:09:44.049500Z

Requiring Chroma.js [1] results in a failure to eval the code, with an error that just says "undefined" [1] https://github.com/gka/chroma.js/

zhuxun2 2020-11-17T03:13:09.051200Z

Minimal code:

(ns app.chroma
  (:require
   ["chroma-js" :as cm]))
After compilation, refresh the browser and the console gives two errors as shown in the attached picture:
main.js:1672 An error occurred when loading app.chroma.js
  env.evalLoad @ main.js:1672
  (anonymous) @ main.js:1886
main.js:1673 undefined
  env.evalLoad @ main.js:1673
  (anonymous) @ main.js:1886

thheller 2020-11-17T10:18:21.052200Z

@zhuxun2 sorry that is not enough information for me to tell whats going on. how is cm actually used?

zhuxun2 2020-11-19T19:51:27.113300Z

@thheller cm is not used at all. The inclusion itself is enough to result in error.