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

175
Vistas
Cannot read properties of undefined (reading 'iterator') in Kotlin Multiplatform

I am trying to run a kmm project js files on a browser. Here the html:

<html lang="en">
<head>
  <meta charset="UTF-8">
  <script src="../packages_imported/kotlin/1.5.10/kotlin.js"></script>
  <script src="../packages_imported/KotlinBigInteger-bignum-js-legacy/0.3.2/KotlinBigInteger-bignum-js-legacy.js"></script>
  <script src="../packages_imported/kotlinx-coroutines-core/1.5.0-native-mt/kotlinx-coroutines-core.js"></script>
  <script src="../packages_imported/ktor-ktor-io-js-legacy/1.6.0/ktor-ktor-io-js-legacy.js"></script>
  <script src="../packages_imported/kotlinx-serialization-kotlinx-serialization-core-js-legacy/1.2.1/kotlinx-serialization-kotlinx-serialization-core-js-legacy.js"></script>
  <script src="../packages_imported/kotlinx-serialization-kotlinx-serialization-json-js-legacy/1.2.1/kotlinx-serialization-kotlinx-serialization-json-js-legacy.js"></script>
  <script src="../packages_imported/ktor-ktor-utils-js-legacy/1.6.0/ktor-ktor-utils-js-legacy.js"></script>
  <script src="../packages_imported/ktor-ktor-http-js-legacy/1.6.0/ktor-ktor-http-js-legacy.js"></script>
  <script src="../packages_imported/ktor-ktor-http-cio-js-legacy/1.6.0/ktor-ktor-http-cio-js-legacy.js"></script>
  <script src="../packages_imported/ktor-ktor-client-core-js-legacy/1.6.0/ktor-ktor-client-core-js-legacy.js"></script>
  <script src="./parippu-vada/kotlin/parippu-vada.js"></script>
  <title>Title</title>
</head>
<body>

</body>
</html>

This throws the following error:

_Collections.kt:1618 Uncaught TypeError: Cannot read properties of undefined (reading 'iterator')
    at _Collections.kt:1618
    at parippu-vada.js:23
    at parippu-vada.js:25

Its shows error in collections.kt @:

/**
 * Applies the given [transform] function to each element of the original collection
 * and appends the results to the given [destination].
 */
public inline fun <T, R, C : MutableCollection<in R>> Iterable<T>.mapTo(destination: C, transform: (T) -> R): C {
    for (item in this) <- this throw error
        destination.add(transform(item))
    return destination
}

Its probably related to kotlin version because the error is in auto-generated file. Is there anything I can do about this.

Am almost giving up on kmm, some inspiration would be nice !

about 4 years ago · Juan Pablo Isaza
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