Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

172
Visualizações
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 à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda