Questions tagged [kotlin-js]

281 questions
0
votes
1 answer

Setting up Netty (or Spark) to provide the output of kotlin-js module as static

I try to create a whole-stack project using Kotlin. As multiplatform projects are experimental in Kotlin, there is not much information available, so I tried to start from the project skeleton of IDEA project wizard (Kotlin > JS Client and JVM…
Balage1551
  • 1,037
  • 1
  • 10
  • 28
0
votes
1 answer

Error getting while building react kotlin app using IntelliJ

I've created a simple react app using create-react-kotlin-app. After successful npm start, I tried to get a build of the project using IntelliJ IDEA's Build -> Build Project, but it fails stating Error:(16, 44) Kotlin: Can't access property…
theapache64
  • 10,926
  • 9
  • 65
  • 108
0
votes
1 answer

KotlinJs - simple HTTP GET without Dynamic Type functionality

I'm totally new in KotlinJs and I wanted to check its potential in server-less service development. I decided to start with calling external API with HTTP GET method using XMLHttpRequest() suggested in KotlinJs documentation. However, I cannot come…
0
votes
1 answer

How to properly use JSON.parse in kotlinjs with enums?

During my fresh adventures with kotlin-react I hit a hard stop when trying to parse some data from my backend which contains enum values. Spring-Boot sends the object in JSON form like this: { "id": 1, "username": "Johnny", "role":…
geisterfurz007
  • 5,292
  • 5
  • 33
  • 54
0
votes
1 answer

How to create kotlin.collections.Set from plain JavaScript array?

I'm trying to call from plain JavaScript into a Kotlin module that has been compiled into JavaScript. One of the Kotlin methods inside the module requires a kotlin.collections.Set to be passed. How can I create such a set object from a plain…
ujay68
  • 390
  • 4
  • 11
0
votes
1 answer

Include js dependencies in kotlin-js

I want to incude javascript dependencies in my kotlinjs project. (concret : https://airbnb.io/polyglot.js/ but others as well). My kotlinjs Project is a gradle Project, developed in IntelliJ Idea. I've searched one day now, but I wasn't able to…
henry86
  • 129
  • 1
  • 8
0
votes
2 answers

Which import do i require to make use of hashrouter in KotlinJS React App

I'm bootstrapping a KotlinJS + React application using the following steps: npm install -g create-react-kotlin-app create-react-kotlin-app frontend cd frontend npm install kotlinx-coroutines-core npm install @jetbrains/kotlin-react-router-dom This…
Jan Vladimir Mostert
  • 12,380
  • 15
  • 80
  • 137
0
votes
1 answer

Could not find method srcDirs() for arguments on SourceSet container of type org.gradle.api.internal.tasks.DefaultSourceSetContainer

I'm trying to compile my Kotlin app and set of Kotlin libraries to JavaScript. I've got that working well, but when I try to run it, it can't find kotlin.js. To remedy this, I tried changing my build.gradle to be more like this example on GitHub.…
Ky -
  • 30,724
  • 51
  • 192
  • 308
0
votes
2 answers

Error: Could not find or load main class MainKt in IntelliJ

I'm using IntelliJ. I can run Java or Kotlin project without any issue but I can't build Kotlin-JS project I have the error Error: Could not find or load main class MainKt My IntelliJ information IntelliJ IDEA 2018.2.6 (Community Edition) Build…
Khyxes
  • 5
  • 1
  • 5
0
votes
1 answer

Create React apps using Kotlin and External

I'm trying to wrap this simple API: https://github.com/github-tools/github, just for study purpose. So, I created this external classes: package index import com.github.jesty.githubapi.Result import com.github.jesty.githubapi.User import…
Davide Cerbo
  • 363
  • 3
  • 10
0
votes
2 answers

gradle kotlin script configuration for javascript

For jvm i can use: plugins { kotlin("jvm") version "1.2.60" } I have found no equivanent string for "jvm" for use with javascript and am using the following: plugins { id("kotlin2js") version "1.2.60" } So the questions. Is there an…
innov8
  • 2,093
  • 2
  • 24
  • 31
1 2 3
18
19