Kotlin for React JS continuous build error

I set up everything as shown in the tutorial, however hot reaload does not work well.

When I run the “browserDevelopmentRun” gradle task with --continuous parameter everything works OK at first time. However, when I make a change and hit Ctrl+S in IntelliJ to refresh the page, nothing changes. However, gradle claims “BUILD SUCCESSFUL”.

modified: C:\UCZELNIA\IZ\VI SEMESTR\Sztuczna inteligencja\Games\connect-four\src\main\kotlin\App.kt
Change detected, executing build...

> Task :packageJson UP-TO-DATE
> Task :kotlinNodeJsSetup SKIPPED
> Task :kotlinNpmInstall
> Task :compileKotlinJs
> Task :processResources UP-TO-DATE
> Task :browserDevelopmentRun

BUILD SUCCESSFUL in 3s
5 actionable tasks: 3 executed, 2 up-to-date

As I said, nothing changes in the broswer.

If I stop the server and run it again and than try to reload, I get an error:

modified: C:\UCZELNIA\IZ\VI SEMESTR\Sztuczna inteligencja\Games\connect-four\src\main\kotlin\App.kt
Change detected, executing build...

> Task :packageJson UP-TO-DATE
> Task :kotlinNodeJsSetup SKIPPED
> Task :kotlinNpmInstall
× 「wdm」: Hash: 3bb1bb75a8168143b270
Version: webpack 4.41.2
Time: 25ms
Built at: 2020-05-07 20:22:36
          Asset     Size  Chunks             Chunk Names
connect-four.js  895 KiB    main  [emitted]  main
Entrypoint main = connect-four.js
[./kotlin/connect-four.js] 384 bytes {main} [built] [failed] [1 error]
    + 33 hidden modules

ERROR in ./kotlin/connect-four.js
Module build failed (from C:/UCZELNIA/IZ/VI SEMESTR/Sztuczna inteligencja/Games/connect-four/build/js/packages_imported/kotlin-source-map-loader/1.3.71/kotlin-source-map-loader.js):
Error: ENOENT: no such file or directory, open 'C:\UCZELNIA\IZ\VI SEMESTR\Sztuczna inteligencja\Games\connect-four\build\js\packages\connect-four\kotlin\connect-four.js'
 @ multi ./kotlin/connect-four.js main[0]
> Task :compileKotlinJs
> Task :processResources UP-TO-DATE
> Task :browserDevelopmentRun

BUILD SUCCESSFUL in 3s
5 actionable tasks: 3 executed, 2 up-to-date

I would be grateful for any help

It looks like https://youtrack.jetbrains.com/issue/KT-32273

1 Like