Hi,
Is it allowed to build a webpack app in Toolforge environment?
I'm asking because I tried to build an Agular app (old ng) for Wiki Loves Monuments and failed. I did found this instructions: https://wikitech.wikimedia.org/wiki/Help:Toolforge/Node.js#Running_npm_with_... And Node18 was installed OK, running `npm i` was OK, but my build failed.
My steps: ```bash
become zabytki # install webservice --backend=kubernetes node18 shell # clone (or pull) mkdir ~/testrepo cd ~/testrepo git clone https://github.com/Eccenux/wlm-zabytki-mapa.git ./ # build npm i npm run build-prod
```
And that last part fails at 92%:
92% sealing asset processing TerserPlugin*Killed*
The build-prod script is defined as: webpack --progress --mode production --env=prod The webpack script is here: https://github.com/Eccenux/wlm-zabytki-mapa/blob/master/webpack.config.js
Would be grateful for any pointers. For now I'm building locally and deploying assets to github (so that I can skip the build step on Toolforge), but when I'm on vacation setting up build env is a complication I'd like to avoid :)
Cheers, Maciej Nux.
How long does your build take locally? It might be timing out on toolforge. If you're simply hosting static files, it might be easier to build on Github CI and then just wget the built artifact into `$HOME/www/static` (https://wikitech.wikimedia.org/wiki/Help:Toolforge/Web#Serving_static_files).
On 24 Aug 2024, at 17:59, Maciej Jaros egil@wp.pl wrote:
Hi,
Is it allowed to build a webpack app in Toolforge environment?
I'm asking because I tried to build an Agular app (old ng) for Wiki Loves Monuments and failed. I did found this instructions: https://wikitech.wikimedia.org/wiki/Help:Toolforge/Node.js#Running_npm_with_... And Node18 was installed OK, running `npm i` was OK, but my build failed.
My steps:
become zabytki # install webservice --backend=kubernetes node18 shell # clone (or pull) mkdir ~/testrepo cd ~/testrepo git clone https://github.com/Eccenux/wlm-zabytki-mapa.git ./ # build npm i npm run build-prod
And that last part fails at 92%:
92% sealing asset processing TerserPlugin*Killed*
The build-prod script is defined as: webpack --progress --mode production --env=prod The webpack script is here: https://github.com/Eccenux/wlm-zabytki-mapa/blob/master/webpack.config.js
Would be grateful for any pointers. For now I'm building locally and deploying assets to github (so that I can skip the build step on Toolforge), but when I'm on vacation setting up build env is a complication I'd like to avoid :)
Cheers, Maciej Nux. _______________________________________________ Cloud mailing list -- cloud@lists.wikimedia.org List information: https://lists.wikimedia.org/postorius/lists/cloud.lists.wikimedia.org/
From personal experience, Webpack builds are very RAM intensive, can easily consume a gigabyte+ of RAM if you’re not careful. It would be best to build locally and upload the artifacts to Toolforge.
—Aoyan Sarkar
On Aug 24, 2024, at 6:09 AM, Sportzpikachu via Cloud cloud@lists.wikimedia.org wrote:
How long does your build take locally? It might be timing out on toolforge. If you're simply hosting static files, it might be easier to build on Github CI and then just wget the built artifact into `$HOME/www/static` (https://wikitech.wikimedia.org/wiki/Help:Toolforge/Web#Serving_static_files).
On 24 Aug 2024, at 17:59, Maciej Jaros egil@wp.pl wrote:
Hi,
Is it allowed to build a webpack app in Toolforge environment?
I'm asking because I tried to build an Agular app (old ng) for Wiki Loves Monuments and failed. I did found this instructions: https://wikitech.wikimedia.org/wiki/Help:Toolforge/Node.js#Running_npm_with_... And Node18 was installed OK, running `npm i` was OK, but my build failed.
My steps:
become zabytki # install webservice --backend=kubernetes node18 shell # clone (or pull) mkdir ~/testrepo cd ~/testrepo git clone https://github.com/Eccenux/wlm-zabytki-mapa.git ./ # build npm i npm run build-prod
And that last part fails at 92%:
92% sealing asset processing TerserPlugin*Killed*
The build-prod script is defined as: webpack --progress --mode production --env=prod The webpack script is here: https://github.com/Eccenux/wlm-zabytki-mapa/blob/master/webpack.config.js
Would be grateful for any pointers. For now I'm building locally and deploying assets to github (so that I can skip the build step on Toolforge), but when I'm on vacation setting up build env is a complication I'd like to avoid :)
Cheers, Maciej Nux. _______________________________________________ Cloud mailing list -- cloud@lists.wikimedia.org List information: https://lists.wikimedia.org/postorius/lists/cloud.lists.wikimedia.org/
Cloud mailing list -- cloud@lists.wikimedia.org List information: https://lists.wikimedia.org/postorius/lists/cloud.lists.wikimedia.org/
By default there are fairly low ram limits on TF, you are probably hitting those and it’s getting killed.
On Sat, Aug 24, 2024 at 7:03 AM Aoyan Sarkar sarkaraoyan@gmail.com wrote:
From personal experience, Webpack builds are very RAM intensive, can easily consume a gigabyte+ of RAM if you’re not careful. It would be best to build locally and upload the artifacts to Toolforge.
—Aoyan Sarkar
On Aug 24, 2024, at 6:09 AM, Sportzpikachu via Cloud <
cloud@lists.wikimedia.org> wrote:
How long does your build take locally? It might be timing out on
toolforge. If you're simply hosting static files, it might be easier to build on Github CI and then just wget the built artifact into `$HOME/www/static` (< https://wikitech.wikimedia.org/wiki/Help:Toolforge/Web#Serving_static_files
).
On 24 Aug 2024, at 17:59, Maciej Jaros egil@wp.pl wrote:
Hi,
Is it allowed to build a webpack app in Toolforge environment?
I'm asking because I tried to build an Agular app (old ng) for Wiki
Loves Monuments and failed. I did found this instructions:
https://wikitech.wikimedia.org/wiki/Help:Toolforge/Node.js#Running_npm_with_...
And Node18 was installed OK, running `npm i` was OK, but my build
failed.
My steps:
become zabytki # install webservice --backend=kubernetes node18 shell # clone (or pull) mkdir ~/testrepo cd ~/testrepo git clone https://github.com/Eccenux/wlm-zabytki-mapa.git ./ # build npm i npm run build-prod
And that last part fails at 92%:
92% sealing asset processing TerserPlugin*Killed*
The build-prod script is defined as: webpack --progress --mode production --env=prod The webpack script is here:
https://github.com/Eccenux/wlm-zabytki-mapa/blob/master/webpack.config.js
Would be grateful for any pointers. For now I'm building locally and
deploying assets to github (so that I can skip the build step on Toolforge), but when I'm on vacation setting up build env is a complication I'd like to avoid :)
Cheers, Maciej Nux. _______________________________________________ Cloud mailing list -- cloud@lists.wikimedia.org List information:
https://lists.wikimedia.org/postorius/lists/cloud.lists.wikimedia.org/
Cloud mailing list -- cloud@lists.wikimedia.org List information:
https://lists.wikimedia.org/postorius/lists/cloud.lists.wikimedia.org/ _______________________________________________ Cloud mailing list -- cloud@lists.wikimedia.org List information: https://lists.wikimedia.org/postorius/lists/cloud.lists.wikimedia.org/
Sportzpikachu via Cloud (24.08.2024 12:09):
How long does your build take locally? It might be timing out on toolforge.
4 seconds on 3,6GHz PC, but it has some large modules:
WARNING in entrypoint size limit: The following entrypoint(s) combined asset size exceeds the recommended limit (244 KiB). This can impact web performance. Entrypoints: main (2.76 MiB) bundle.166.js?v=2024.08.24 bundle.main.js?v=2024.08.24 ... webpack 5.93.0 compiled with 3 warnings in 4101 ms
Cheers, Maciej Nux.