Fork me on GitHub
#shadow-cljs
<
2020-11-17
>
zhuxun203:11:44

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/

zhuxun203:11:09

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

thheller10:11:21

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

zhuxun219:11:27

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