Anyone else is experiencing webpack production tas...
# javascript
r
Anyone else is experiencing webpack production task not being executed? Even after clean build the
jsBrowserProductionWebpack
task is somehow skipped.
Running gradle with
--info
shows this:
Copy code
> Task :examples:hello-world:jsBrowserProductionWebpack FROM-CACHE
Build cache key for task ':examples:hello-world:jsBrowserProductionWebpack' is 04688503566953bbe1c2ae2e010ccccc
Task ':examples:hello-world:jsBrowserProductionWebpack' is not up-to-date because:
  Output property 'outputDirectory' file /home/rjaros/git/kilua/examples/hello-world/build/kotlin-webpack/js/productionExecutable has been removed.
Loaded cache entry for task ':examples:hello-world:jsBrowserProductionWebpack' with cache key 04688503566953bbe1c2ae2e010ccccc
Resolve mutations for :examples:hello-world:jsBrowserDistribution (Thread[#10101,Execution worker Thread 3,5,main]) started.
:examples:hello-world:jsBrowserDistribution (Thread[#10101,Execution worker Thread 3,5,main]) started.
It's reported as not up-to-date but still is not executed. The production bundle is not created.
Setting
org.gradle.caching=false
fixes the issue, but makes build process very slow.
I'm using Kotlin 2.2.20-RC and Gradle 9.0
The problem somehow appears only in my complex project (with some apps inside an
example
subdirectory). It doesn't appear with simple projects.
It fixed itself then.
d
@Robert Jaros I am facing the similar issue with latest compose multiplatform. When I try to run
wasmJsBrowserDistribution
it works. But, when I try to run j`sBrowserDistribution` it stuck at
jsBrowserProductionWebpack.
This only happens in my project having large codebase. When I generate sample project using Kotlin Wizard, it works fine.
r
I can't reproduce my issue now. I think it was some caching issue. As for your problem, you should check if the webpack nodejs process is running. If it does - perhaps it just needs even more time to finish. You can also run webpack manually from the command line using the same command in the same directory. Perhaps you will get some output info.
p
Try to increase max memory size in gradle.properties
Copy code
org.gradle.jvmargs=-Xmx<Some bigger value>
d
This is what it looks like in output:
Copy code
> Task :apps:webApp:jsBrowserProductionWebpack
Deleting stale output file: /Users/dhavalshah/Desktop/projects_v3/expensePal/compose-web-support/build/js/packages/ExpensePal-apps-webApp/webpack.config.js
Deleting stale output file: /Users/dhavalshah/Desktop/projects_v3/expensePal/compose-web-support/apps/webApp/build/kotlin-webpack/js/productionExecutable
Build cache key for task ':apps:webApp:jsBrowserProductionWebpack' is 615c70635f22192aa400328ad844c9c9
Task ':apps:webApp:jsBrowserProductionWebpack' is not up-to-date because:
  No history is available.
Starting process 'command '/Users/dhavalshah/.gradle/nodejs/node-v22.0.0-darwin-arm64/bin/node''. Working directory: /Users/dhavalshah/Desktop/projects_v3/expensePal/compose-web-support/build/js/packages/ExpensePal-apps-webApp Command: /Users/dhavalshah/.gradle/nodejs/node-v22.0.0-darwin-arm64/bin/node /Users/dhavalshah/Desktop/projects_v3/expensePal/compose-web-support/build/js/node_modules/webpack/bin/webpack.js --config /Users/dhavalshah/Desktop/projects_v3/expensePal/compose-web-support/build/js/packages/ExpensePal-apps-webApp/webpack.config.js
Successfully started process 'command '/Users/dhavalshah/.gradle/nodejs/node-v22.0.0-darwin-arm64/bin/node''
<============-> 99% EXECUTING [1m 49s]
> IDLE
> IDLE
> :apps:webApp:jsBrowserProductionWebpack > webpack
> IDLE
> IDLE
> IDLE
> IDLE
> IDLE
@PHondogo I tried increasing the memory size as well. Still stuck at here.