简体   繁体   中英

Kotlin JS Client and JVM Server build webpack SyntaxError

I'm trying to build JS Client and JVM server kotlin project generated by IntelliJ IDEA. Getting error:

[...]\node_modules\.bin\webpack:2
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
          ^^^^^^^

SyntaxError: missing ) after argument list

Found that it's common problem with npm and webpack on Windows and could be fixed by editing package.json file. Webpack unable to bundle due to SyntaxError Problem that package.json is generated by build itself and I don't know how to apply this fix in my situation.

Looks that it should be applied somewhere around this code in build.gradle:

jvmJar {
    dependsOn(jsBrowserWebpack)
    from(new File(jsBrowserWebpack.entry.name, jsBrowserWebpack.outputPath))
}

Issue was fixed in recent kotlin plugin version for idea - 1.3.50

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