nixos-homepage
nixos-homepage copied to clipboard
Unable to reproduce the NixOS website locally
While working on issue #1081, I noticed a particular issue.
Running the serve command appears to consume a significant amount of power, and it takes more than 2 minutes to load a simple HTML page from the website (http://localhost:8000/). Additionally, once the page finally loads, there is a complete absence of any CSS.
Having a fully functional and reproducible NixOS website is crucial if we plan to introduce new features and implement bug fixes effectively.
After some investigation, I believe I've managed to isolate the issue. It appears to originates from the tmp.svg.less task, which seems to return an error code.
When running it alone, I get this:
make tmp.svg.less
❯ make tmp.svg.less
embed-svg site-styles/assets tmp.svg.less
:: Optimizing svg files
:: - site-styles/assets.tmp/book.svg
:: - site-styles/assets.tmp/gfx-discourse.svg
:: - site-styles/assets.tmp/gfx-discourse.white.svg
:: - site-styles/assets.tmp/gfx-donate-merch.svg
:: - site-styles/assets.tmp/gfx-explore-cloud.svg
:: - site-styles/assets.tmp/gfx-explore-community.svg
:: - site-styles/assets.tmp/gfx-explore-disaster.svg
:: - site-styles/assets.tmp/gfx-explore-experiment.svg
:: - site-styles/assets.tmp/gfx-explore-multi.svg
:: - site-styles/assets.tmp/gfx-explore-timemachine.svg
:: - site-styles/assets.tmp/gfx-explore-works.svg
:: - site-styles/assets.tmp/gfx-gpu.white.svg
:: - site-styles/assets.tmp/gfx-infra.svg
:: - site-styles/assets.tmp/gfx-infra.white.svg
:: - site-styles/assets.tmp/gfx-landing-declarative.svg
:: - site-styles/assets.tmp/gfx-landing-reliable.svg
:: - site-styles/assets.tmp/gfx-landing-reproducible.svg
:: - site-styles/assets.tmp/gfx-learn-develop.svg
:: - site-styles/assets.tmp/gfx-learn-how.svg
:: - site-styles/assets.tmp/gfx-learn-install.svg
:: - site-styles/assets.tmp/gfx-learn-manual.svg
:: - site-styles/assets.tmp/gfx-marketing.svg
:: - site-styles/assets.tmp/gfx-marketing.white.svg
:: - site-styles/assets.tmp/gfx-nixcon.svg
:: - site-styles/assets.tmp/gfx-nixcon.white.svg
:: - site-styles/assets.tmp/gfx-release.svg
:: - site-styles/assets.tmp/gfx-release.white.svg
:: - site-styles/assets.tmp/gfx-rfc-steering.svg
:: - site-styles/assets.tmp/gfx-rfc-steering.white.svg
:: - site-styles/assets.tmp/gfx-security.svg
:: - site-styles/assets.tmp/gfx-security.white.svg
:: - site-styles/assets.tmp/nixcon.2018.svg
:: - site-styles/assets.tmp/nixcon.2019.svg
:: - site-styles/assets.tmp/nixcon.2020.svg
:: - site-styles/assets.tmp/nixcon.2022.svg
:: - site-styles/assets.tmp/rfc-process.svg
book.svg:
Done in 89 ms!
0.515 KiB - 22.8% = 0.397 KiB
gfx-landing-reliable.svg:
Done in 284 ms!
8.195 KiB - 46.4% = 4.392 KiB
gfx-rfc-steering.svg:
Done in 269 ms!
6.51 KiB - 43.7% = 3.668 KiB
gfx-gpu.white.svg:
Done in 131 ms!
3.257 KiB - 65.3% = 1.131 KiB
gfx-learn-how.svg:
gfx-release.svg:
Done in 266 ms!
13.912 KiB - 57.8% = 5.87 KiB
Done in 135 ms!
5.042 KiB - 53.9% = 2.324 KiB
nixcon.2018.svg:
Done in 202 ms!
3.291 KiB - 0.1% = 3.289 KiB
gfx-release.white.svg:
Done in 175 ms!
5.042 KiB - 54% = 2.318 KiB
gfx-marketing.svg:
Done in 329 ms!
7.973 KiB - 45.4% = 4.35 KiB
gfx-rfc-steering.white.svg:
Done in 264 ms!
6.51 KiB - 43.8% = 3.656 KiB
gfx-security.white.svg:
Done in 217 ms!
3.684 KiB - 67.8% = 1.187 KiB
gfx-security.svg:
Done in 215 ms!
3.684 KiB - 67.6% = 1.192 KiB
nixcon.2022.svg:
Done in 250 ms!
5.247 KiB - 7.4% = 4.859 KiB
gfx-landing-declarative.svg:
Done in 368 ms!
10.889 KiB - 45.4% = 5.943 KiB
gfx-infra.white.svg:
Done in 296 ms!
10.166 KiB - 59.9% = 4.076 KiB
gfx-nixcon.white.svg:
Done in 315 ms!
6.899 KiB - 47.7% = 3.606 KiB
gfx-discourse.white.svg:
Done in 401 ms!
11.327 KiB - 46.3% = 6.087 KiB
gfx-nixcon.svg:
Done in 285 ms!
6.899 KiB - 47.6% = 3.612 KiB
gfx-discourse.svg:
Done in 485 ms!
11.327 KiB - 46.2% = 6.096 KiB
gfx-marketing.white.svg:
Done in 432 ms!
7.973 KiB - 45.6% = 4.335 KiB
gfx-explore-works.svg:
Done in 1119 ms!
66.474 KiB - 35.6% = 42.781 KiB
gfx-infra.svg:
Done in 528 ms!
10.166 KiB - 59.8% = 4.085 KiB
gfx-learn-install.svg:
Done in 395 ms!
5.522 KiB - 49.9% = 2.766 KiB
gfx-learn-manual.svg:
Done in 374 ms!
11.336 KiB - 58.6% = 4.691 KiB
gfx-landing-reproducible.svg:
Done in 615 ms!
17.495 KiB - 45.8% = 9.487 KiB
gfx-learn-develop.svg:
Done in 507 ms!
10.22 KiB - 41.5% = 5.983 KiB
nixcon.2019.svg:
Done in 896 ms!
32.099 KiB - 0.5% = 31.934 KiB
rfc-process.svg:
Done in 752 ms!
17.064 KiB - 35.5% = 11.004 KiB
gfx-explore-multi.svg:
Done in 927 ms!
121.931 KiB - 36.1% = 77.903 KiB
gfx-explore-cloud.svg:
Done in 1157 ms!
67.768 KiB - 35.8% = 43.533 KiB
gfx-explore-disaster.svg:
Done in 1082 ms!
82.374 KiB - 34.9% = 53.614 KiB
nixcon.2020.svg:
Done in 1050 ms!
138.237 KiB - 1.6% = 136.052 KiB
gfx-explore-experiment.svg:
Done in 1243 ms!
198.513 KiB - 42.4% = 114.441 KiB
gfx-explore-community.svg:
Done in 1238 ms!
121.078 KiB - 33% = 81.136 KiB
gfx-explore-timemachine.svg:
Done in 2422 ms!
1035.682 KiB - 46.9% = 550.279 KiB
gfx-donate-merch.svg:
Done in 2793 ms!
2441.708 KiB - 58.7% = 1007.823 KiB
:: Embedding SVG files
make: *** [Makefile:250: tmp.svg.less] Error 1
~/C/N/nixos-homepage > refactor/replace-shuffle-commercial-provider-script-june-2023 +37 -19 [!] ✘
To reproduce the issue:
- Clone the
nixos-homepageproject - Enable direnv
direnv allowand wait for all the deps to be loaded - Run
serve - Try to go on the Index page http://localhost:8000/
Can you help me fixing this?