Title
m

melatonina

03/10/2017, 4:54 PM
I had to close the project and re-open it. IDEA asked me if I wanted to "import the gradle projects", I imported all of them. Then I had to replace classpath "com.moowork.gradle:gradle-node-plugin:0.12" with the code found here: https://plugins.gradle.org/plugin/com.moowork.node (I used the Gradle 2.1 code plugins { id "com.moowork.node" version "1.1.1" }). Re-syncing Gradle I had "Cannot add extension with name 'kotlin', as there is an extension already registered with that name." errors in several places like "apply plugin: 'kotlin'" or similar lines.
b

bashor

03/10/2017, 5:19 PM
where do you have “kotlin" plugin?
probably you need “kotlin2js"
m

melatonina

03/10/2017, 5:25 PM
All gradle files (demo_kotlin.gradle, kotlin-nodejs-experiment-master.gradle and express_js.gradle) have "apply plugin: 'kotlin'". express_js.gradle has both that and "kotlin2js", If I comment out all "apply plugin: 'kotlin'" the compiler crashes with this error message: http://pastebin.com/EkHnPMZk
Actually, all gradle files had the "kotlin2js" plugin applied. So now they all have only that and the compiler crashes as described above.
b

bashor

03/10/2017, 6:12 PM
could you please try to build with gradle (from console)
m

melatonina

03/10/2017, 6:35 PM
"gradle build" completed successfully. I can't investigate further what's the result of the build now but I'll do it in a couple of hours and report back. Thanks for your assistance, Zalim.
b

bashor

03/10/2017, 6:52 PM
so try to reimport project in IDEA
and maybe restart IDEA before
m

melatonina

03/10/2017, 9:25 PM
I restarted IDEA, I re-imported the project but when I build it from IDEA I get the same exceptions as before.
b

bashor

03/13/2017, 5:32 PM
As workaround comment
kotlinOptions.verbose = true
in build.gradle
m

melatonina

03/15/2017, 11:36 PM
Hi, Zalim. I applied right away the workaround that you suggested. It fixed the previous problem. Currently building directly from gradle on the command line still works but the IDEA editor tabs show errors on all usages of the "dynamic" keyword. The attempts to build the sources from IDEA fail. Removing the keyword doesn't work and I could find nothing on the web about this problem. This is the current version of the sources, after I modified them as you suggested: https://drive.google.com/open?id=0BzsejsK5DpyrN1pteHNKMWxLQVE
b

bashor

03/17/2017, 4:39 PM
@alexey.sedunov please check this project ^^^
@melatonina try remove `compile “org.jetbrains.kotlin:kotlin-stdlib-jre8:$kotlin_version”`from your
build.gradle
a

alexey.sedunov

03/17/2017, 5:08 PM
@melatonina you can also add apply plugin: 'kotlin-platform-js' to your js subproject
This will override paltform autodetection by stdlib dependency
m

melatonina

03/17/2017, 5:19 PM
Thanks @alexey.sedunov and @bashor Now the project builds just fine. I'll contact the author and send him a copy of the updated sources. And I'll try to make my own Kotlin-to-Javascript "hello, world!" project.
👍 2