joreilly / PeopleInSpace

Kotlin Multiplatform project with SwiftUI, Jetpack Compose, Compose for Wear, Compose for Desktop, and Compose for Web clients along with Ktor backend.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Unable to run web platforms due to webpack problem

chris-sloan opened this issue · comments

commented

I've checked out the latest main branch and am trying to run the web based platforms but am running into a build issue. Both :compose-web:jsBrowserDevelopmentRun and :web:browserDevelopmentRun are failing with the same issue.

According to this post, webpack should be updated to version 4.10.0.

This does indeed solve the problem.

> Task :web:browserDevelopmentRun FAILED
Execution optimizations have been disabled for task ':web:browserDevelopmentRun' to ensure correctness due to the following reasons:
  - Gradle detected a problem with the following location: '/Users/chris/Documents/Code/kmp/PeopleInSpace/build/js/packages/PeopleInSpace-web/kotlin/PeopleInSpace-web.js'. Reason: Task ':web:browserDevelopmentRun' uses this output of task ':web:developmentExecutableCompileSync' without declaring an explicit or implicit dependency. This can lead to incorrect results being produced, depending on what order the tasks are executed. Please refer to https://docs.gradle.org/7.4/userguide/validation_problems.html#implicit_dependency for more details about this problem.
[webpack-cli] TypeError: cli.isMultipleCompiler is not a function
[webpack-cli] TypeError: cli.isMultipleCompiler is not a function
    at Command.<anonymous> (/Users/chris/Documents/Code/kmp/PeopleInSpace/build/js/node_modules/@webpack-cli/serve/lib/index.js:146:35)
    at async Promise.all (index 1)
    at async Command.<anonymous> (/Users/chris/Documents/Code/kmp/PeopleInSpace/build/js/node_modules/webpack-cli/lib/webpack-cli.js:1687:7)

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':web:browserDevelopmentRun'.
> [webpack-cli] TypeError: cli.isMultipleCompiler is not a function
  [webpack-cli] TypeError: cli.isMultipleCompiler is not a function
      at Command.<anonymous> (/Users/chris/Documents/Code/kmp/PeopleInSpace/build/js/node_modules/@webpack-cli/serve/lib/index.js:146:35)
      at async Promise.all (index 1)
      at async Command.<anonymous> (/Users/chris/Documents/Code/kmp/PeopleInSpace/build/js/node_modules/webpack-cli/lib/webpack-cli.js:1687:7)

* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.

* Get more help at https://help.gradle.org

Deprecated Gradle features were used in this build, making it incompatible with Gradle 8.0.

You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.

See https://docs.gradle.org/7.4/userguide/command_line_interface.html#sec:command_line_warnings

Execution optimizations have been disabled for 1 invalid unit(s) of work during this build to ensure correctness.
Please consult deprecation warnings for more details.

BUILD FAILED in 14s
28 actionable tasks: 7 executed, 21 up-to-date

Not sure if it would be a factor but what IDE are you using? I built/ran both web clients here and they seem to be working. In any case it seems like this change should probably be made....can you open PR with it and I'll merge it?

commented

Hmmm, yeah I hadn't thought about the IDE being the problem, but for what it's worth, it was AS Electric Eel Beta 2.

Pr is up.

commented

I see the same on IDEA 2022.2.3 too