Error getting while building react kotlin app using IntelliJ

185 Views Asked by At

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.

1

There are 1 best solutions below

0
theapache64 On BEST ANSWER

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.