简体   繁体   中英

Error getting while building react kotlin app using IntelliJ

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.

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM