Auto import in idea not working when using a custom Kotlin Javascript Library from a Kotlin Javascript project


#1

When I use a custom javascript library in a custom javascript project the included project doesn’t seem to be indexed correctly.

For example, when I try to use a class from the library then idea won’t know where to import it from (it wont know the class). After I add the import statement manually all the autocomplete functions work without a problem and everything is fine.

I am using 1.1.0-beta-18. Here is the javascript library:

https://gitbucket.astraeus.nl/rnentjes/kotlin-webgl-test

And here is the project that uses it:

https://gitbucket.astraeus.nl/rnentjes/kotlin-use-kudens-js-lib

Does anyone know how I can solve this?

Btw, a good example of how to do this (creating and using a JavaScript library in Kotlin) would be appreciated. A lot of examples I found online are for older kotlin versions.


#2

In case anyone stumbles on the same problem, it was happening because the sources where added twice to the jar file, which apparently confused idea.