Issue Description
During the multiplatform test build, the jsTest target is failing with a webpack module resolution error.
Error Details
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':compileTestDevelopmentExecutableKotlinJs'.
> Could not resolve all files for configuration ':jsTestRuntimeClasspath'.
> Failed to transform kotlin-test-js-1.9.10.klib to match attributes ...
> Execution failed for JsIrTransformer: ...
> org.jetbrains.kotlin.cli.common.ExitCode$INTERNAL_ERROR: Uncaught exception
> e: java.lang.RuntimeException: Module not found: Error: Can't resolve 'webpack/lib/index' ...
Context
- Kotlin Version: 1.9.10
- Gradle Task:
:compileTestDevelopmentExecutableKotlinJs
- Configuration:
:jsTestRuntimeClasspath
Technical Analysis
The error occurs during the Kotlin/JS IR transformation phase when webpack tries to resolve its internal module structure. This appears to be a webpack configuration or compatibility issue with the Kotlin Multiplatform setup.
Potential Causes
- Webpack version mismatch between Kotlin's requirements and what's available
- Missing webpack dependencies in the build configuration
- Incompatibility between kotlin-test-js and the webpack version
Impact
- Blocks JS target testing
- Only affects jsTest target; JVM tests complete successfully
Reproduction
Run: ./gradlew test or ./gradlew jsTest
Workaround
Currently running JVM tests only: ./gradlew jvmTest
Issue Description
During the multiplatform test build, the jsTest target is failing with a webpack module resolution error.
Error Details
Context
:compileTestDevelopmentExecutableKotlinJs:jsTestRuntimeClasspathTechnical Analysis
The error occurs during the Kotlin/JS IR transformation phase when webpack tries to resolve its internal module structure. This appears to be a webpack configuration or compatibility issue with the Kotlin Multiplatform setup.
Potential Causes
Impact
Reproduction
Run:
./gradlew testor./gradlew jsTestWorkaround
Currently running JVM tests only:
./gradlew jvmTest