Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

450
Vistas
Kotlin multiplatform gradle task "jsRun" gives error "[webpack-cli] TypeError: cli.isMultipleCompiler is not a function"

I have a Kotlin multiplatform project with JVM and JS. When executing jsRun gradle task to start the webpack server, it fails with the following error:

Waiting for changes to input files of tasks... (ctrl-d then enter to exit)
[webpack-cli] TypeError: cli.isMultipleCompiler is not a function
[webpack-cli] TypeError: cli.isMultipleCompiler is not a function
    at Command.<anonymous> (C:\MyProject\build\js\node_modules\@webpack-cli\serve\lib\index.js:146:35)
    at async Promise.all (index 1)
    at async Command.<anonymous> (C:\MyProject\build\js\node_modules\webpack-cli\lib\webpack-cli.js:1687:7)

Compilation succeeds and I can serve the project via Ktor, the problem seems to be the webpack dev server.

The package.json that kotlin gradle plugin generates seems to use webpack-cli 4.9.0.

{
  "name": "MyProject-client",
  "version": "1.0.0",
  "main": "kotlin/MyProject-client.js",
  "devDependencies": {
    "sass-loader": "13.0.0",
    "sass": "1.53.0",
    "style-loader": "3.3.1",
    "css-loader": "6.7.1",
    "resolve-url-loader": "5.0.0",
    "webpack": "5.57.1",
    "webpack-cli": "4.9.0",
    "format-util": "1.0.5",
    "source-map-loader": "3.0.0",
    "webpack-dev-server": "4.3.1",
    "dukat": "0.5.8-rc.4"
  },
  "dependencies": {},
  "peerDependencies": {},
  "optionalDependencies": {},
  "bundledDependencies": []
}

This says that it's a bug in webpack-cli 4.9.0 and suggests upgrading to 4.10.0. I don't know if/how webpack versions can be changed in Kotlin/JS.

about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

This should be added to build.gradle.kts in the affected project to force the webpack-cli version. This is a workaround until the Kotlin team updates the hardcoded version.

// Fixes webpack-cli incompatibility by pinning the newest version.
rootProject.extensions.configure<org.jetbrains.kotlin.gradle.targets.js.nodejs.NodeJsRootExtension> {
    versions.webpackCli.version = "4.10.0"
}
about 4 years ago · Juan Pablo Isaza Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda