This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2021-06-12
Channels
- # announcements (9)
- # babashka (2)
- # beginners (27)
- # clojure (19)
- # clojure-bay-area (1)
- # clojure-germany (7)
- # clojure-nl (1)
- # clojure-norway (1)
- # clojurescript (6)
- # conjure (1)
- # datomic (10)
- # fulcro (11)
- # graalvm (1)
- # introduce-yourself (3)
- # jobs (1)
- # luminus (1)
- # malli (9)
- # off-topic (23)
- # podcasts-discuss (3)
- # polylith (6)
- # practicalli (1)
- # re-frame (14)
- # sci (2)
- # shadow-cljs (5)
Hi all, I'm having a problem with @react-three/drei
library. When I require it ["@react-three/drei" :refer [Sky Environment]]
, I get this error:
Closure compilation failed with 2 errors
--- node_modules/three-stdlib/index.cjs.js:2
Illegal variable reference before declaration: i
--- node_modules/three-stdlib/index.cjs.js:2
Illegal variable reference before declaration: t
I've tried a couple of :js-options
options did not work out:
{:js-provider :shadow
:keep-native-requires true
:output-feature-set :es6
:closure-output-charset "ascii"}
Here is my package.json:
"@pmndrs/branding": "^0.0.8",
"@react-three/cannon": "2.1.2",
"@react-three/drei": "6.0.2",
"@react-three/fiber": "7.0.1",
"@react-three/postprocessing": "2.0.4",
"@types/three": "0.129.1",
"lodash-es": "^4.17.21",
"react": "^17.0.2",
"react-dom": "^17.0.2",
"three": "0.129.0",
Any suggestions?not much you can do config-wise. according to the closure-compiler there seems to be some invalid code. I guess you can use webpack as described in this post https://code.thheller.com/blog/shadow-cljs/2020/05/08/how-about-webpack-now.html
sometimes code is actually invalid and webpack just happens to make it work due to its processing
@thheller "shadow-cljs": "2.12.5"