Not sure if there is still time get fixes into 2.5...
# javascript
e
Not sure if there is still time get fixes into 2.5.0-RC, but I’ve just encountered another compiler ISE.
Copy code
java.lang.IllegalStateException: Should not appear in non ES-modules compilations
	at org.jetbrains.kotlin.ir.backend.js.transformers.irToJs.CrossModuleReferences.generateCrossModuleImportStatement(JsIrProgramFragment.kt:293)
youtrack.jetbrains.com/issue/KT-91423
👀 3
b
I'm afraid it won't make it into the RC, but we'll take a look
e
No worries. I understand why it happens so I’m good, but other less experienced devs could find it difficult to trace back the real issue.
b
Could you please describe your workaround in the issue?
e
No workaround needed. Here the problem is I’m trying to use
per-file
with CJS. It’s unsupported by design, but in previous versions (don’t exactly recall which ones), it failed at the Gradle level with a much better informational message.
If you look at the docs, it says “es2015 and es2020 target JavaScript versions”. However, that does not imply “use ESM only”.