Skip to main content
AI Assist is now on Stack Overflow. Start a chat to get instant answers from across the network. Sign up to save and share your chats.
Filter by
Sorted by
Tagged with
3 votes
1 answer
254 views

In a basic kotlin js project, I imported the firebase dependency. I used Dukat to get access to the type references and got them to compile. My kotlin compiles like a charm, however it seems to me ...
jlengrand's user avatar
  • 12.9k
3 votes
1 answer
370 views

I have the following setup. Kotlin Multiplatform project with a Web App and Shared module. I also have included a build of a library that I had to modify myself as it wasn't working properly. When ...
Nikola-Milovic's user avatar
15 votes
3 answers
2k views

I was doing the tutorial for React Kotlin and couldnt even finish the setup step because the server does not start. The code is unchanged : https://github.com/kotlin-hands-on/web-app-react-kotlin-js-...
Mokyx's user avatar
  • 161
0 votes
2 answers
334 views

I am looking for an ability to describe format templates (eg. used in java.util.Formatter) for dates (like java.text.SimpleDateFormat) and numbers (like java.text.DecimalFormat) that could be ...
svaor's user avatar
  • 2,245
1 vote
1 answer
428 views

Hello everyone I tried getting react-hook-form to work with KotlinJS using Dukat and Wrappers, this is what I got. (the wrapper works fine, tried logging it in the console and it indeed is useForm ...
Nikola-Milovic's user avatar
4 votes
1 answer
4k views

Hi I am getting started with KotlinJS on Node and I've put a very simple kotlin file and I want to compile it using the raw kotlinc-js compiler. Without using gradle package main fun heavy() { (1....
Some random IT boy's user avatar
1 vote
1 answer
860 views

My website is displaying an undesired white border for all my components, even when using default configs: Main.kt fun main() { renderComposable("root") { Div({ style { height(...
LeoColman's user avatar
  • 7,213
2 votes
0 answers
759 views

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="../...
vizsatiz's user avatar
  • 2,211
1 vote
1 answer
463 views

Hello everyone I am trying to get value from textArea DOM but it doesn't seem to work like regular react val chat = fc<ChatProps> { props -> val (mess, setMess) = useState("") ...
Nikola-Milovic's user avatar
2 votes
0 answers
1k views

Created a Kotlin MPP for developing a JS library, and a JVM lib. Everything worked well in the Kotlin world and I was able to build the project. Once build was completed the distributions folder(...
vizsatiz's user avatar
  • 2,211
1 vote
0 answers
111 views

Using Kotlin/js, here's something that works: fun main() { val canvas=document.getElementById("mainCanvas") as HTMLCanvasElement val ctx=canvas.getContext("2d") as ...
D. Kupra's user avatar
  • 372
0 votes
1 answer
407 views

I would like to ask for some help/suggestions on an issue we're facing when trying to unit test platform specific Date classes in our Kotlin Multiplatform project. Our Kotlin Multiplatform library ...
Daan's user avatar
  • 485
1 vote
1 answer
821 views

I want to check if a given (reified) generic class is an enum: console.log(isEnum<String>(), isEnum<MyObject>(), isEnum<MyEnum>()) should print false, false, true for following ...
vonox7's user avatar
  • 1,167
0 votes
1 answer
361 views

Is it possible to use the Google Closure Compiler to minify Kotlin JS code further than what Webpack offers? If so, how can it be done?
CLOVIS's user avatar
  • 1,046
1 vote
1 answer
890 views

Kotlin/JS maintains a local Node installation, used by Yarn, etc. Is there a way to execute commands via that installation, without using a Gradle plugin that downloads another one?
CLOVIS's user avatar
  • 1,046
1 vote
0 answers
106 views

I'm trying to build some basic Kotlin code as a JS library. Just for testing, I want to be able to call some of this code right from a browser console. Here is some of the code I'm working with. build....
TheJakester42's user avatar
0 votes
1 answer
287 views

In my application (Kotlin/JS, React), the image is loaded from remote resource: import org.w3c.dom.HTMLElement import react.RBuilder ... private var imageForLoad: HTMLElement? = null ... override fun ...
alexrnov's user avatar
  • 2,544
6 votes
1 answer
2k views

I am new to JS and to Kotlin/JS. I have the following minimal working Javascript code for a Plugin for Obsidian from an example. It works as expected: var obsidian = require('obsidian'); class ...
findusl's user avatar
  • 2,674
2 votes
1 answer
1k views

I'm developing an application with Kotlin/JS and Gradle. I can easily add npm dependencies from the default npm registry with the implementation npm("query-string", "7.0.0") ...
Yannick's user avatar
  • 6,199
3 votes
0 answers
334 views

I’m trying to write a library using the new Kotlin/JS IR compiler. Specifically, I want to write the library using Kotlin, but to publish it as a NPM package to be used in a Typescript/Node project. I ...
jsfr's user avatar
  • 55
0 votes
1 answer
155 views

I'm having some issues setting up github actions to build my kotlinJS project? i have the js runtime dependency: implementation(npm("kotlinx-serialization-kotlinx-serialization-core-jslegacy"...
siliconeagle's user avatar
  • 7,403
2 votes
0 answers
201 views

I'm having difficulty importing the RxJs library in my full stack Kotlin/JS project. I put the following in my build.gradle.kts file in the frontendMain section: implementation(npm("@reactivex/...
Michael220's user avatar
13 votes
2 answers
4k views

If I have a JavaScript file called myfile.js as follows: function myJsFunc() { return "Hello from JavaScript"; } How can I import this file into a Kotlin/JS project and invoke myJsFunc() ...
funkybro's user avatar
  • 8,728
0 votes
1 answer
894 views

I've been reading books and trying examples for Kotlin full-stack development, but they all have one thing in common, that they are built for SPA apps and the logic is heavy on the client side. ...
Lord Yggdrasill's user avatar
5 votes
0 answers
423 views

I have built a kotlin multiplatform project using gradle from my home machine without any problems. However upon entering a corporate proxy that does not allow the downloading of executable files. I ...
BigA's user avatar
  • 51
2 votes
0 answers
132 views

I have a Kotlin/JS project that is throwing a null pointer exception, but I can't figure out where it is coming from. The source map in the browser references exceptionUtils.kt?24ab which is a generic ...
RedBassett's user avatar
  • 3,597
0 votes
1 answer
95 views

Developing a Kotlin/JS project, we are generating KDoc using Dokka Maven plugin. However standard JS library classes are presented as ERROR CLASS in the generated doc. Example: having function like ...
mpts.cz's user avatar
  • 261
0 votes
1 answer
632 views

Is there a way to have async event handlers in lit-html ? I have this submit event that's being triggered when the form is submitted to create a new user, but I also want to reload the list of users ...
Jan Vladimir Mostert's user avatar
0 votes
1 answer
504 views

Am trying to create navbar with logo but unable to increase the size of image. This is written in kotlin/js but concept should be same for native html/js code. Html index file: fun HTML.index() { ...
Tarun Chawla's user avatar
4 votes
2 answers
3k views

I have an AndrodiStudio KMM project and I'd like to add a JS target. Given that JS development is only available in IntelliJ, I'd expect that I have to open the project in IDEA add a "Module"...
Stefan Haustein's user avatar
1 vote
0 answers
98 views

I'm attempting to write a wrapper for an npm package but I cannot figure out how to define classes within a module in a separate file. It works fine if I do it within the single class but the file ...
zp4rker's user avatar
  • 11
1 vote
0 answers
292 views

When I follow the guide Create a multiplatform library I manage to get Jar to be used in Kotlin/JVM side, but the npm module doesn't look good - it is generatesd with physical paths to dependenices to ...
augur's user avatar
  • 256
2 votes
0 answers
205 views

I have a kotlinjs app. I handle a particular event (dropping of data onto a component) like this: onEvent { drop = { event -> GlobalScope.async { ...
user717847's user avatar
2 votes
0 answers
808 views

I try to reference an image resource from react kotlin app. welcome.kt under src/main/kotlin: import react.dom.img @JsModule("./logo.svg") @JsNonModule external val logo: dynamic @JsExport ...
user15301099's user avatar
1 vote
0 answers
514 views

I am using the workaround for testing coroutines in common code. the most suggested workaround and seems to work for a lot of people kotlinx-coroutines-test for multiplatform, but by js test is ...
Ipkiss's user avatar
  • 811
3 votes
1 answer
480 views

I need to convert existing multi-module jvm project into a multiplatform project. //Exisiting Modules: (JVM Project) core data app app_server utils db //Need to add: app_frontend (Kotlin/JS) Need to ...
wishnuprathikantam's user avatar
1 vote
0 answers
418 views

I have a situation where I am trying to create a google chrome extension using KotlinJs and I was following the Rivas Diaz (https://github.com/rivasdiaz/helloworld-chrome-extension-kotlin). With this, ...
chirag patel's user avatar
1 vote
0 answers
131 views

I am trying to get my KotlinJS running in a Docker container. Normally this should not be a problem. The programm itself is a KVision-website and runs without errors. When putting it into a Docker ...
fpü's user avatar
  • 23
8 votes
2 answers
4k views

I created a new Kotlin/JS Gradle project using the wizard in IntelliJ. I'm unclear how I'm supposed to add css to the project. The documentation explains how to enable css webpack support, but it ...
vbyzjnlehi's user avatar
0 votes
1 answer
1k views

I'm trying to implement a general serialization framework to convert outgoing and incoming messages to json using the kotlinx serialialization. I'm developing a multiplatform app, so I'm trying to get ...
Geosearchef's user avatar
0 votes
0 answers
92 views

When I start the app, I get error code H14: no web proccess running. I've already seen this: Gradle java web app doesn't start on heroku heroku, and I've tried to run the command, yet I get this ...
TheOnlyTails's user avatar
0 votes
1 answer
208 views

I'm trying to read a JSON array from a file, store it as a List in my component, and use it to display some stuff, yet I'm getting this error: Warning: Can't call setState on a component that is not ...
TheOnlyTails's user avatar
3 votes
1 answer
2k views

Sorry, but the Kotlin documentation doesn't help me to export a Kotlin JS project to deploy it on my webserver. I created a new Kotlin Browser Application with the new project wizard in IntelliJ. ...
Ralph Bergmann's user avatar
0 votes
0 answers
638 views

I have a running JS code that uses HandleBarJs: var fs = require('fs'); let template = fs.readFileSync('template.txt', 'utf8') let submissionJson = fs.readFileSync('submission.json', 'utf8') var ...
Chintan Soni's user avatar
  • 25.4k
1 vote
2 answers
3k views

I'm playing a little bit with Kotlin Multiplatform. Right now, I try to develop a Kotlin JS library to import and use it in an external JavaScript project. This works fine so far. Kotlin creates the ...
Ralph Bergmann's user avatar
0 votes
1 answer
175 views

I'm writing my first Progressive Web App for some experience with the concept. The web app is written in Kotlin.js and the ServiceWorker is too. When running the app I get this error Uncaught Error: ...
Hugh Bollen's user avatar
0 votes
1 answer
876 views

I'm trying to build kotlin multiplatfrom project behind corporate proxy connection and got and error: Couldn't find package "[email protected]" required by "projectName@version" on ...
Davin Reinaldo Gozali's user avatar
4 votes
3 answers
1k views

When building my project using the browserDistribution Gradle task, Kotlin/JS puts the output which has been processed by webpack into /build/distributions/myProject.js. Instead, I would like my ...
Sebastian A.'s user avatar
1 vote
1 answer
494 views

I have a very basic Kotlin/JS application targeting Node.js through the Gradle plugin. I want to read the command line arguments passed to the process when I execute it (using node build/js/packages/...
Sebastian A.'s user avatar
1 vote
2 answers
429 views

Background: Options-objects in JavaScript A common concept in JavaScript is something like this: function MyLibrary(options) { if (options.optionA) { /* ... */ } if (options.optionB) { /* ... *...
yankee's user avatar
  • 41.3k