Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Current version doesn't run #21

Open
CfGit12 opened this issue Jun 24, 2022 · 2 comments
Open

Current version doesn't run #21

CfGit12 opened this issue Jun 24, 2022 · 2 comments

Comments

@CfGit12
Copy link

CfGit12 commented Jun 24, 2022

Just checked out the project and tried to run browserDevelopmentRun but it fails with:

[webpack-cli] TypeError: cli.isMultipleCompiler is not a function
[webpack-cli] TypeError: cli.isMultipleCompiler is not a function
at Command. (/Users/Charles.Flynn/IdeaProjects/CF/web-app-react-kotlin-js-gradle/build/js/node_modules/@webpack-cli/serve/lib/index.js:146:35)
at async Promise.all (index 1)
at async Command. (/Users/Charles.Flynn/IdeaProjects/CF/web-app-react-kotlin-js-gradle/build/js/node_modules/webpack-cli/lib/webpack-cli.js:1687:7)

I've been able to fix it by bumping the webpack version as follows in build.gradle.kts:

rootProject.plugins.withType(org.jetbrains.kotlin.gradle.targets.js.nodejs.NodeJsRootPlugin::class.java) {
    rootProject.the<org.jetbrains.kotlin.gradle.targets.js.nodejs.NodeJsRootExtension>().versions.webpackCli.version = "4.10.0"
}

Putting this here in case anyone else comes across it, and so it can be fixed to prevent others encountering this.

@SebastianAigner
Copy link
Member

Thanks for the report, @CfGit12 . Indeed, there is a problem that's currently affecting other Kotlin/JS projects as well: https://youtrack.jetbrains.com/issue/KT-52776/ and https://youtrack.jetbrains.com/issue/KT-52890.

We'll update this tutorial with Kotlin 1.7.10, which also addresses this problem.

@SebastianAigner
Copy link
Member

Another snippet to downgrade the webpack version until we've addressed this:

rootProject.extensions.configure<org.jetbrains.kotlin.gradle.targets.js.nodejs.NodeJsRootExtension> {
    versions.webpackCli.version = "4.10.0"
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants