This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2023-08-01
Channels
- # announcements (1)
- # babashka (18)
- # babashka-sci-dev (10)
- # beginners (17)
- # clj-on-windows (21)
- # clj-yaml (4)
- # cljs-dev (33)
- # cljsrn (2)
- # clojure (51)
- # clojure-austin (3)
- # clojure-doc (22)
- # clojure-europe (17)
- # clojure-greece (4)
- # clojure-norway (6)
- # clr (4)
- # conjure (7)
- # datalog (14)
- # emacs (11)
- # hyperfiddle (121)
- # introduce-yourself (1)
- # kaocha (1)
- # malli (8)
- # practicalli (1)
- # releases (1)
- # shadow-cljs (26)
- # squint (2)
Currently trying to use https://github.com/vasturiano/react-force-graph. It seemingly gets compiled correctly into main.js, but in the web browser I run into this after requiring it in my CLJS file. I’m guessing this has something to do with there suddenly being multiple identical modules…? I wonder if there is any way to make this work at all…? Can’t find any similar import issues in the user guide.
the error you get is from three.js, so you'll need to investigate where you are getting multiple three.js versions from
a build report might help https://shadow-cljs.github.io/docs/UsersGuide.html#build-report
I didn’t include three.js myself, but I guess it probably comes in as a transitive dependency in several places. This the package-json:
{
"dependencies": {
"create-react-class": "^15.7.0",
"katex": "0.12.0",
"markdown-it": "12.3.2",
"markdown-it-block-image": "0.0.3",
"markdown-it-footnote": "3.0.3",
"markdown-it-texmath": "0.9.7",
"markdown-it-toc-done-right": "4.2.0",
"punycode": "2.1.1",
"react": "^17.0.2",
"react-dom": "^17.0.2",
"react-force-graph": "^1.43.0"
}
}
and the report doesn’t contain duplicates, or at least I am unable to see ascertain their existence :man-shrugging:
Aframe seems abnormally large, but I’m not really sure what to do with that knowledge.
that will make shadow-cljs not include the three npm package at all and instead use the global variable THREE
So that successfully removes the warning about the duplicate three.js, but the module load error is still present (and it actually crashes Firefox completely for me, had to force-quit). Do you have any idea how to debug something like that…?
I mean this error. I can’t even view the compiled JS, since Firefox crashes when I attempt to do so… not that I think it would help much.
that is not enough info. as the text says any additional errors are whats relevant. not the yellow warnings