0

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 'reactLogo' marked with @JsModule annotation from non-modular project

What am I missing here ?

NOTE: I haven't done any modification in the template comes with create-react-kotlin-app. The project runs successfully, problem only exist when I try to get a build.

theapache64
  • 10,926
  • 9
  • 65
  • 108
  • You can enable Settings (Preferences on macOS) | Build, Execution, Deployment | Build Tools | Gradle | Runner | *Delegate IDE build/run actions to Gradle* to make IDE use Gradle build instead of IDE own builder. – Andrey May 13 '19 at 07:47

1 Answers1

1

I got managed to fix this issue via terminal.

From the project root, run

react-scripts-kotlin build

This will automatically creates a build folder with production ready files.

theapache64
  • 10,926
  • 9
  • 65
  • 108