Fork me on GitHub
#shadow-cljs
<
2023-08-30
>
teawaterwire08:08:07

i'm using Cloudflare Pages and since i upgraded Shadow i'm getting this build error:

11:27:30.266	Retrieving thheller/shadow-cljs/2.25.2/shadow-cljs-2.25.2-aot.jar from 
11:27:30.635	shadow-cljs - dependencies updated
11:27:32.642	Execution error (UnsupportedClassVersionError) at java.lang.ClassLoader/defineClass1 (ClassLoader.java:-2).
11:27:32.642	com/google/javascript/jscomp/CompilerOptions has been compiled by a more recent version of the Java Runtime (class file version 55.0), this version of the Java Runtime only recognizes class file versions up to 52.0
which version of shadow could i try to revert to?

thheller08:08:48

upgrade the java version? jdk8 hasn't been supported for a while now

teawaterwire08:08:34

i guess i'll have to play with direct uploads

phill10:08:24

Java 8 is current until March 2014 (https://adoptium.net/support/)

wontheone110:08:19

Hi! I encountered problem with running REPL with shadow-cljs after updating to the newest Mac OS. But I found a fix and now it's good. I just wanted to share my solution proactively in case it helps somebody. My error message:

Execution error (UnsatisfiedLinkError) at jdk.internal.loader.NativeLibraries/load (NativeLibraries.java:-2).
/private/var/folders/_h/lx47mbpn2ygfqxwf9c52q94w0000gn/T/jna12303503249564807063.tmp: dlopen(/private/var/folders/_h/lx47mbpn2ygfqxwf9c52q94w0000gn/T/jna12303503249564807063.tmp, 0x0001): tried: '/private/var/folders/_h/lx47mbpn2ygfqxwf9c52q94w0000gn/T/jna12303503249564807063.tmp' (fat file, but missing compatible architecture (have 'unknown,i386,x86_64', need 'arm64')), '/System/Volumes/Preboot/Cryptexes/OS/private/var/folders/_h/lx47mbpn2ygfqxwf9c52q94w0000gn/T/jna12303503249564807063.tmp' (no such file), '/private/var/folders/_h/lx47mbpn2ygfqxwf9c52q94w0000gn/T/jna12303503249564807063.tmp' (fat file, but missing compatible architecture (have 'unknown,i386,x86_64', need 'arm64'))
Workaround: add :fs-watch {:hawk false} to shadow-cljs.edn config. Found similar issues and fixes such as: https://github.com/thheller/shadow-cljs/issues/774 https://github.com/thheller/shadow-cljs/issues/767 Happy coding!

🙌 2
thheller10:08:14

uhm hawk has been gone for several years. are you on a super old shadow-cljs version?

wontheone110:08:12

Originally it was ^2.14.4 , but before adding fs-watch {:hawk false} , I upgraded the shadow-cljs to ^2.25.3 to see if it fixes the problem. but it didn't help. 😄

thheller11:08:51

just changing the version in package.json does nothing

thheller11:08:20

did you actually npm install it? or do you use deps.edn or project.clj for dependencies?

thheller11:08:38

the hawk option doesn't exist anymore, so if setting it changes anything then you are not on the latest version 😛

wontheone112:08:49

Thanks. yes I npm install ed to update in package.json. but yeah I found deps.edn and the version there is 2.8.76. Didn't know there were 2 places that define shadow-cljs version and the priority between them. But yeah, thanks for pointing that out 😄