Hello!
I have some issues on building my Astro website (https://662767b0875a779b3b5f904d--motortg-web.netlify.app/ ) on Netlify compared to serving locally with netlify serve. More precisely, on Netlify content and chunks folders aren’t being generated on building:
I don’t know why it’s like that, build commands are the same both locally and production. I tried resetting build cache with no luck.
Any help is appreciated, thanks.
Netlify logs
9:48:49 AM: build-image version: 3d3c7e8b4321e2c1a54a2c4584fb46ba742b1630 (focal)
9:48:49 AM: buildbot version: 3d3c7e8b4321e2c1a54a2c4584fb46ba742b1630
9:48:49 AM: Fetching cached dependencies
9:48:49 AM: Starting to download cache of 167.3MB
9:48:50 AM: Finished downloading cache in 1.364s
9:48:50 AM: Starting to extract cache
9:48:53 AM: Finished extracting cache in 2.106s
9:48:53 AM: Finished fetching cache in 3.532s
9:48:53 AM: Starting to prepare the repo for build
9:48:53 AM: Preparing Git Reference pull/482/head
9:48:54 AM: Custom build command detected. Proceeding with the specified command: 'bun run astro build'
9:48:55 AM: Starting to install dependencies
9:48:55 AM: Python version set to 3.8
9:48:55 AM: Attempting Ruby version 2.7.2, read from environment
9:48:56 AM: Using Ruby version 2.7.2
9:48:57 AM: Started restoring cached go cache
9:48:57 AM: Finished restoring cached go cache
9:48:57 AM: Installing Go version 1.17 (requested 1.17)
9:49:01 AM: go version go1.17 linux/amd64
9:49:02 AM: Using PHP version 8.0
9:49:03 AM: Started restoring cached Node.js version
9:49:04 AM: Finished restoring cached Node.js version
9:49:04 AM: v20.12.2 is already installed.
9:49:04 AM: Now using node v20.12.2 (npm v10.5.0)
9:49:04 AM: Enabling Node.js Corepack
9:49:05 AM: Started restoring cached build plugins
9:49:05 AM: Finished restoring cached build plugins
9:49:05 AM: Started restoring cached corepack dependencies
9:49:05 AM: Finished restoring cached corepack dependencies
9:49:05 AM: Started restoring cached bun global cache
9:49:05 AM: Finished restoring cached bun global cache
9:49:05 AM: Installing npm packages using bun version 1.1.4
9:49:05 AM: bun install v1.1.4 (fbe2fe0c)
9:49:07 AM: + @types/bun@1.1.0
9:49:07 AM: + astro@4.6.3
9:49:07 AM: + @astrojs/mdx@2.3.1
9:49:07 AM: + astro-embed@0.7.1
9:49:07 AM: + netlify-plugin-csp-generator@1.6.1
9:49:07 AM: + photoswipe@5.4.3
9:49:07 AM: + photoswipe-dynamic-caption-plugin@1.2.7
9:49:07 AM: + sharp@0.33.3
9:49:07 AM: 875 packages installed [2.61s]
9:49:07 AM: npm packages installed using bun
9:49:08 AM: Successfully installed dependencies
9:49:08 AM: Starting build script
9:49:09 AM: Detected 1 framework(s)
9:49:09 AM: "astro" at version "4.6.3"
9:49:09 AM: Section completed: initializing
9:49:11 AM:
9:49:11 AM: Netlify Build
9:49:11 AM: ────────────────────────────────────────────────────────────────
9:49:11 AM:
9:49:11 AM: ❯ Version
9:49:11 AM: @netlify/build 29.39.2
9:49:11 AM:
9:49:11 AM: ❯ Flags
9:49:11 AM: baseRelDir: true
9:49:11 AM: buildId: 662767b0875a779b3b5f904b
9:49:11 AM: deployId: 662767b0875a779b3b5f904d
9:49:11 AM:
9:49:11 AM: ❯ Current directory
9:49:11 AM: /opt/build/repo
9:49:11 AM:
9:49:11 AM: ❯ Config file
9:49:11 AM: /opt/build/repo/netlify.toml
9:49:11 AM:
9:49:11 AM: ❯ Context
9:49:11 AM: deploy-preview
9:49:11 AM:
9:49:11 AM: ❯ Loading plugins
9:49:11 AM: - netlify-plugin-csp-generator@1.6.1 from netlify.toml and package.json
9:49:13 AM:
9:49:13 AM: @netlify/plugin-functions-install-core (onPreBuild event)
9:49:13 AM: ────────────────────────────────────────────────────────────────
9:49:13 AM:
9:49:13 AM: Installing functions dependencies
9:49:14 AM:
9:49:14 AM: (@netlify/plugin-functions-install-core onPreBuild completed in 1s)
9:49:14 AM:
9:49:14 AM: build.command from netlify.toml
9:49:14 AM: ────────────────────────────────────────────────────────────────
9:49:14 AM:
9:49:14 AM: $ bun run astro build
9:49:14 AM: $ astro build
9:49:15 AM: 07:49:15 [build] output: "static"
9:49:15 AM: 07:49:15 [build] directory: /opt/build/repo/dist/
9:49:15 AM: 07:49:15 [build] Collecting build info...
9:49:15 AM: 07:49:15 [build] ✓ Completed in 476ms.
9:49:15 AM: 07:49:15 [build] Building static entrypoints...
9:49:15 AM: 07:49:15 [build] Cache invalid, rebuilding from source. Reason: No content manifest was found in the cache.
9:49:18 AM: 07:49:18 [vite] ✓ built in 2.18s
9:49:18 AM: 07:49:18 [build] ✓ Completed in 2.22s.
9:49:18 AM: building client (vite)
9:49:18 AM: 07:49:18 [vite] transforming...
9:49:18 AM: 07:49:18 [vite] ✓ 8 modules transformed.
9:49:18 AM: 07:49:18 [vite] rendering chunks...
9:49:18 AM: 07:49:18 [vite] computing gzip size...
9:49:18 AM: 07:49:18 [vite] dist/_astro/page.1GeRkbLk.js 2.56 kB │ gzip: 1.12 kB
9:49:18 AM: 07:49:18 [vite] dist/_astro/ImageGallery.astro_astro_type_script_index_0_lang.C9oqKfBc.js 23.12 kB │ gzip: 6.83 kB
9:49:18 AM: 07:49:18 [vite] dist/_astro/photoswipe.esm.C0FT-EY-.js 60.32 kB │ gzip: 17.45 kB
9:49:18 AM: 07:49:18 [vite] ✓ built in 259ms
9:49:18 AM: generating static routes
9:49:18 AM: 07:49:18 ▶ src/pages/404.astro
9:49:18 AM: 07:49:18 └─ /404.html (+7ms)
9:49:18 AM: 07:49:18 ▶ src/pages/articoli/[...slug].astro
9:49:18 AM: 07:49:18 ├─ /articoli/static-content/index.html (+148ms)
9:49:18 AM: 07:49:18 ├─ /articoli/f1/formula-1-gp-del-giappone-uscito-il-rapporto-della-fia/index.html (+46ms)
9:49:18 AM: 07:49:18 ├─ /articoli/f1/regolamento-2023/index.html (+29ms)
9:49:18 AM: 07:49:18 ├─ /articoli/f1/regolamento-2026/index.html (+28ms)
9:49:18 AM: 07:49:18 ├─ /articoli/f1/un-campionato-tutto-al-femminile-ecco-la-f1-academy/index.html (+97ms)
9:49:18 AM: 07:49:18 ├─ /articoli/f1/usciti-i-rapporti-fia-sul-cost-cap-red-bull-e-aston-martin-multate/index.html (+20ms)
9:49:18 AM: 07:49:18 ├─ /articoli/motogp/sprint-race-2023/index.html (+127ms)
9:49:19 AM: 07:49:18 └─ /articoli/motogp/weekend-2023/index.html (+106ms)
9:49:19 AM: 07:49:19 ▶ src/pages/wip.astro
9:49:19 AM: 07:49:19 └─ /wip/index.html (+2ms)
9:49:19 AM: 07:49:19 ✓ Completed in 655ms.
9:49:19 AM:
9:49:19 AM: generating optimized images
9:49:19 AM: 07:49:19 ▶ /_astro/introducing-astro.BRswpisM_2pdN4P.webp (before: 269kB, after: 7kB) (+135ms) (1/19)
9:49:19 AM: 07:49:19 ▶ /_astro/introducing-astro.BRswpisM_ZXaNXk.webp (before: 269kB, after: 45kB) (+364ms) (2/19)
9:49:19 AM: 07:49:19 ▶ /_astro/introducing-astro.BRswpisM_ZpUuHV.webp (before: 269kB, after: 7kB) (+118ms) (3/19)
9:49:19 AM: 07:49:19 ▶ /_astro/f1-academy.HdCBObQg_ZboHnm.webp (before: 61kB, after: 55kB) (+75ms) (4/19)
9:49:19 AM: 07:49:19 ▶ /_astro/aragon.7e9j-yG2_Z24CgJG.webp (before: 181kB, after: 110kB) (+159ms) (5/19)
9:49:20 AM: 07:49:20 ▶ /_astro/aragon.7e9j-yG2_ZsVAbz.webp (before: 181kB, after: 175kB) (+175ms) (6/19)
9:49:20 AM: 07:49:20 ▶ /_astro/aragon.7e9j-yG2_xmddO.webp (before: 181kB, after: 38kB) (+58ms) (7/19)
9:49:20 AM: 07:49:20 ▶ /_astro/f4_art_cover.DJLtEIlz_16lDIG.webp (before: 1373kB, after: 78kB) (+245ms) (8/19)
9:49:20 AM: 07:49:20 ▶ /_astro/f4_art_cover.DJLtEIlz_y08IA.webp (before: 1373kB, after: 82kB) (+259ms) (9/19)
9:49:20 AM: 07:49:20 ▶ /_astro/f4_art_cover.DJLtEIlz_QT7cQ.webp (before: 1373kB, after: 22kB) (+116ms) (10/19)
9:49:21 AM: 07:49:21 ▶ /_astro/moto4.DClGkC0I_pAqHV.webp (before: 288kB, after: 180kB) (+506ms) (11/19)
9:49:21 AM: 07:49:21 ▶ /_astro/leclerc-verstappen.CDE4apjS_2gCJNO.webp (before: 218kB, after: 106kB) (+169ms) (12/19)
9:49:21 AM: 07:49:21 ▶ /_astro/leclerc-verstappen.CDE4apjS_Z2igotv.webp (before: 218kB, after: 22kB) (+56ms) (13/19)
9:49:21 AM: 07:49:21 ▶ /_astro/fia_logo.DyZtTXDG_29AuDo.webp (before: 83kB, after: 61kB) (+164ms) (14/19)
9:49:21 AM: 07:49:21 ▶ /_astro/fia_logo.DyZtTXDG_Z1kwzfF.webp (before: 83kB, after: 16kB) (+43ms) (15/19)
9:49:21 AM: 07:49:21 ▶ /_astro/fia_flag_39.DTB--Gsw_Z4EIjV.webp (before: 84kB, after: 61kB) (+141ms) (16/19)
9:49:21 AM: 07:49:21 ▶ /_astro/fia_flag_39.DTB--Gsw_ZzMLYi.webp (before: 84kB, after: 18kB) (+36ms) (17/19)
9:49:22 AM: 07:49:22 ▶ /_astro/Indonesian_Grand_Prix_2022_-_Race_by_Box_Repsol.DdK23v2T_Z1eszG0.webp (before: 633kB, after: 150kB) (+272ms) (18/19)
9:49:22 AM: 07:49:22 ▶ /_astro/Indonesian_Grand_Prix_2022_-_Race_by_Box_Repsol.DdK23v2T_Z1rGRh8.webp (before: 633kB, after: 26kB) (+101ms) (19/19)
9:49:22 AM: 07:49:22 ✓ Completed in 3.20s.
9:49:22 AM:
9:49:22 AM: 07:49:22 [build] 10 page(s) built in 6.86s
9:49:22 AM: 07:49:22 [build] Complete!
9:49:22 AM:
9:49:22 AM: (build.command completed in 7.9s)
9:49:22 AM:
9:49:22 AM: Functions bundling
9:49:22 AM: ────────────────────────────────────────────────────────────────
9:49:22 AM:
9:49:22 AM: Packaging Functions from netlify/functions directory:
9:49:22 AM: - new-post/index.js
9:49:22 AM:
9:49:24 AM: Post processing - redirect rules
9:49:24 AM: Post processing done
9:49:24 AM: Section completed: postprocessing
9:49:24 AM: Post processing - Forms
9:49:23 AM:
9:49:23 AM: (Functions bundling completed in 913ms)
9:49:23 AM:
9:49:23 AM: netlify-plugin-csp-generator (onPostBuild event)
9:49:23 AM: ────────────────────────────────────────────────────────────────
9:49:23 AM:
9:49:23 AM: Excluding 0 files
9:49:23 AM: Found 11 HTML files
9:49:23 AM: Saved at dist/_headers - 0.33 seconds
9:49:23 AM:
9:49:23 AM: (netlify-plugin-csp-generator onPostBuild completed in 414ms)
9:49:23 AM:
9:49:23 AM: Deploy site
9:49:23 AM: ────────────────────────────────────────────────────────────────
9:49:23 AM:
9:49:23 AM: Starting to deploy site from 'dist'
9:49:23 AM: Calculating files to upload
9:49:24 AM: 0 new files to upload
9:49:24 AM: 0 new functions to upload
9:49:24 AM: Section completed: deploying
9:49:24 AM: Site deploy was successfully initiated
9:49:24 AM:
9:49:24 AM: (Deploy site completed in 339ms)
9:49:24 AM:
9:49:24 AM: Netlify Build Complete
9:49:24 AM: ────────────────────────────────────────────────────────────────
9:49:24 AM:
9:49:24 AM: (Netlify Build completed in 12.9s)
9:49:24 AM: Caching artifacts
9:49:24 AM: Started saving node modules
9:49:24 AM: Finished saving node modules
9:49:24 AM: Started saving build plugins
9:49:24 AM: Finished saving build plugins
9:49:24 AM: Started saving corepack cache
9:49:24 AM: Finished saving corepack cache
9:49:24 AM: Started saving bun global cache
9:49:24 AM: Finished saving bun global cache
9:49:24 AM: Started saving pip cache
9:49:24 AM: Finished saving pip cache
9:49:24 AM: Started saving emacs cask dependencies
9:49:24 AM: Finished saving emacs cask dependencies
9:49:24 AM: Started saving maven dependencies
9:49:24 AM: Finished saving maven dependencies
9:49:24 AM: Started saving boot dependencies
9:49:24 AM: Finished saving boot dependencies
9:49:24 AM: Started saving rust rustup cache
9:49:24 AM: Finished saving rust rustup cache
9:49:24 AM: Started saving go dependencies
9:49:24 AM: Finished saving go dependencies
9:49:24 AM: Build script success
9:49:24 AM: Section completed: building
9:49:26 AM: Uploading Cache of size 167.0MB
9:49:24 AM: Post processing - header rules
9:49:27 AM: Section completed: cleanup
9:49:27 AM: Finished processing build request in 38.112s
9:49:24 AM: Starting post processing
9:49:28 AM: Site is live ✨
dig
April 23, 2024, 11:27pm
2
What happens when you build this locally (not serving it)? Does it build correctly (remember to remove any previous build output first for an accurate test.)
Yes, It builds correctly, generating content and chucks folders. These folders are critical to reduce build time while providing integrity of Astro content collection cache.
dig
April 23, 2024, 11:44pm
4
I didn’t need to know that.
I can see your CSS and JS assets in the _astro
folder. Can you let us know how you verified this? The build process is handled by Astro and not Netlify, so it’s unlikely we’re causing an issue, but happy to see some evidence.
I suspect it’s Netlify because Astro build system works fine in local.
I use bun for both enviroments and I think there is some issue that installed packages are not cached correctly in Netlify because I can build multiple times locally (deleting dist each time) and I still get content collection cached normally.
I’ll attach some logs from my local environment:
Local logs
◈ Ignored general context env var: LANG (defined in process)
◈ Injected .env file env var: URL
◈ Using simple static server because '[dev.framework]' was set to '#static'
◈ Ignoring 'targetPort' setting since using a simple static server.
◈ Use --staticServerPort or [dev.staticServerPort] to configure the static server port
◈ Running static server from "motortg-web\dist"
◈ Building site for production
◈ Changes will not be hot-reloaded, so if you need to rebuild your site you must exit and run 'netlify serve' again
Netlify Build
────────────────────────────────────────────────────────────────
❯ Version
@netlify/build 29.39.1
❯ Flags
configPath: D:\GitHub\motortg-web\netlify.toml
outputConfigPath: D:\GitHub\motortg-web\.netlify\netlify.toml
❯ Current directory
D:\GitHub\motortg-web
❯ Config file
D:\GitHub\motortg-web\netlify.toml
❯ Context
production
❯ Loading plugins
- netlify-plugin-csp-generator@1.6.1 from netlify.toml and package.json
@netlify/plugin-functions-install-core (onPreBuild event)
────────────────────────────────────────────────────────────────
Debugger attached.
Installing functions dependencies
(@netlify/plugin-functions-install-core onPreBuild completed in 1.7s)
build.command from netlify.toml
────────────────────────────────────────────────────────────────
$ bun run astro build
$ astro build
Debugger attached.
09:15:51 [build] output: "static"
09:15:51 [build] directory: D:\GitHub\motortg-web\dist\
09:15:51 [build] Collecting build info...
09:15:51 [build] ✓ Completed in 535ms.
09:15:51 [build] Building static entrypoints...
09:15:52 [vite] ✓ built in 999ms
09:15:52 [build] ✓ Completed in 1.05s.
building client (vite)
09:15:52 [vite] ✓ 8 modules transformed.
09:15:52 [vite] dist/_astro/page.1GeRkbLk.js 2.56 kB │ gzip: 1.12 kB
09:15:52 [vite] dist/_astro/ImageGallery.astro_astro_type_script_index_0_lang.C9oqKfBc.js 23.12 kB │ gzip: 6.83 kB
09:15:52 [vite] dist/_astro/photoswipe.esm.C0FT-EY-.js 60.32 kB │ gzip: 17.45 kB
09:15:52 [vite] ✓ built in 285ms
generating static routes
09:15:52 ▶ src/pages/404.astro
09:15:52 └─ /404.html (+10ms)
09:15:53 ▶ src/pages/articoli/[...slug].astro
09:15:53 ├─ /articoli/static-content/index.html (+107ms)
09:15:53 ├─ /articoli/f1/formula-1-gp-del-giappone-uscito-il-rapporto-della-fia/index.html (+52ms)
09:15:53 ├─ /articoli/f1/regolamento-2023/index.html (+32ms)
09:15:53 ├─ /articoli/f1/regolamento-2026/index.html (+32ms)
09:15:53 ├─ /articoli/f1/un-campionato-tutto-al-femminile-ecco-la-f1-academy/index.html (+86ms)
09:15:53 ├─ /articoli/f1/usciti-i-rapporti-fia-sul-cost-cap-red-bull-e-aston-martin-multate/index.html (+30ms)
09:15:53 ├─ /articoli/motogp/sprint-race-2023/index.html (+97ms)
09:15:53 └─ /articoli/motogp/weekend-2023/index.html (+86ms)
09:15:53 ▶ src/pages/wip.astro
09:15:53 └─ /wip/index.html (+3ms)
09:15:53 ✓ Completed in 644ms.
generating optimized images
09:15:53 ▶ /_astro/introducing-astro.BRswpisM_2pdN4P.webp (reused cache entry) (+1ms) (1/19)
09:15:53 ▶ /_astro/introducing-astro.BRswpisM_Z1e9tci.webp (reused cache entry) (+1ms) (2/19)
09:15:53 ▶ /_astro/introducing-astro.BRswpisM_1wbKwV.webp (reused cache entry) (+1ms) (3/19)
09:15:53 ▶ /_astro/f1-academy.HdCBObQg_ZboHnm.webp (reused cache entry) (+1ms) (4/19)
09:15:53 ▶ /_astro/aragon.7e9j-yG2_Z24CgJG.webp (reused cache entry) (+1ms) (5/19)
09:15:53 ▶ /_astro/aragon.7e9j-yG2_O6NFR.webp (reused cache entry) (+1ms) (6/19)
09:15:53 ▶ /_astro/aragon.7e9j-yG2_Zo1AMO.webp (reused cache entry) (+1ms) (7/19)
09:15:53 ▶ /_astro/f4_art_cover.DJLtEIlz_16lDIG.webp (reused cache entry) (+0ms) (8/19)
09:15:53 ▶ /_astro/f4_art_cover.DJLtEIlz_Z2pspYs.webp (reused cache entry) (+0ms) (9/19)
09:15:53 ▶ /_astro/f4_art_cover.DJLtEIlz_wqgdJ.webp (reused cache entry) (+1ms) (10/19)
09:15:53 ▶ /_astro/moto4.DClGkC0I_pAqHV.webp (reused cache entry) (+1ms) (11/19)
09:15:53 ▶ /_astro/leclerc-verstappen.CDE4apjS_ZgtV6S.webp (reused cache entry) (+1ms) (12/19)
09:15:53 ▶ /_astro/leclerc-verstappen.CDE4apjS_Z28fzxl.webp (reused cache entry) (+1ms) (13/19)
09:15:53 ▶ /_astro/fia_logo.DyZtTXDG_ZIECim.webp (reused cache entry) (+1ms) (14/19)
09:15:53 ▶ /_astro/fia_logo.DyZtTXDG_ZB5u59.webp (reused cache entry) (+0ms) (15/19)
09:15:53 ▶ /_astro/fia_flag_39.DTB--Gsw_Kk4SO.webp (reused cache entry) (+0ms) (16/19)
09:15:53 ▶ /_astro/fia_flag_39.DTB--Gsw_255taH.webp (reused cache entry) (+0ms) (17/19)
09:15:53 ▶ /_astro/Indonesian_Grand_Prix_2022_-_Race_by_Box_Repsol.DdK23v2T_RScQn.webp (reused cache entry) (+1ms) (18/19)
09:15:53 ▶ /_astro/Indonesian_Grand_Prix_2022_-_Race_by_Box_Repsol.DdK23v2T_Z6e33s.webp (reused cache entry) (+1ms) (19/19)
09:15:53 ✓ Completed in 22ms.
09:15:53 [build] 10 page(s) built in 2.63s
09:15:53 [build] Complete!
Waiting for the debugger to disconnect...
(build.command completed in 5.1s)
Functions bundling
────────────────────────────────────────────────────────────────
Packaging Functions from netlify\functions directory:
- new-post\index.js
(Functions bundling completed in 1s)
netlify-plugin-csp-generator (onPostBuild event)
────────────────────────────────────────────────────────────────
Debugger attached.
Excluding 0 files
Found 11 HTML files
Saved at dist/_headers - 0.36 seconds
(netlify-plugin-csp-generator onPostBuild completed in 1.1s)
Save deploy artifacts
────────────────────────────────────────────────────────────────
(Save deploy artifacts completed in 2ms)
Netlify Build Complete
────────────────────────────────────────────────────────────────
(Netlify Build completed in 14.6s)
◈ Static server listening to 3999
And these are Netlify logs with the same bun.lockb:
Netlify logs
12:18:21 AM: Build ready to start
12:18:34 AM: build-image version: 3d3c7e8b4321e2c1a54a2c4584fb46ba742b1630 (focal)
12:18:34 AM: buildbot version: d85d718afb4cfc1d31fb4837470daa2b526f928f
12:18:34 AM: Fetching cached dependencies
12:18:34 AM: Starting to download cache of 173.2MB
12:18:36 AM: Finished downloading cache in 2.015s
12:18:36 AM: Starting to extract cache
12:18:37 AM: Finished extracting cache in 1.743s
12:18:37 AM: Finished fetching cache in 3.81s
12:18:37 AM: Starting to prepare the repo for build
12:18:38 AM: Preparing Git Reference refs/heads/master
12:18:39 AM: Custom build command detected. Proceeding with the specified command: 'bun run astro build'
12:18:40 AM: Starting to install dependencies
12:18:41 AM: Python version set to 3.8
12:18:41 AM: Attempting Ruby version 2.7.2, read from environment
12:18:41 AM: Using Ruby version 2.7.2
12:18:42 AM: Started restoring cached go cache
12:18:42 AM: Finished restoring cached go cache
12:18:42 AM: Installing Go version 1.17 (requested 1.17)
12:18:47 AM: go version go1.17 linux/amd64
12:18:47 AM: Using PHP version 8.0
12:18:49 AM: Started restoring cached Node.js version
12:18:50 AM: Finished restoring cached Node.js version
12:18:51 AM: v20.12.2 is already installed.
12:18:51 AM: Now using node v20.12.2 (npm v10.5.0)
12:18:51 AM: Enabling Node.js Corepack
12:18:52 AM: Started restoring cached build plugins
12:18:52 AM: Finished restoring cached build plugins
12:18:52 AM: Started restoring cached corepack dependencies
12:18:52 AM: Finished restoring cached corepack dependencies
12:18:52 AM: Started restoring cached bun global cache
12:18:52 AM: Finished restoring cached bun global cache
12:18:52 AM: Installing npm packages using bun version 1.1.4
12:18:52 AM: bun install v1.1.4 (fbe2fe0c)
12:18:54 AM: + @astrojs/mdx@2.3.1
12:18:54 AM: + astro@4.7.0
12:18:54 AM: + astro-embed@0.7.1
12:18:54 AM: + netlify-plugin-csp-generator@1.6.1
12:18:54 AM: + photoswipe@5.4.3
12:18:54 AM: + photoswipe-dynamic-caption-plugin@1.2.7
12:18:54 AM: + sharp@0.33.3
12:18:54 AM: 826 packages installed [2.19s]
12:18:54 AM: npm packages installed using bun
12:18:54 AM: Successfully installed dependencies
12:18:54 AM: Starting build script
12:18:55 AM: Detected 1 framework(s)
12:18:55 AM: "astro" at version "4.7.0"
12:18:55 AM: Section completed: initializing
12:18:57 AM:
12:18:57 AM: Netlify Build
12:18:57 AM: ────────────────────────────────────────────────────────────────
12:18:57 AM:
12:18:57 AM: ❯ Version
12:18:57 AM: @netlify/build 29.41.1
12:18:57 AM:
12:18:57 AM: ❯ Flags
12:18:57 AM: baseRelDir: true
12:18:57 AM: buildId: 662ad6ad4da478000804a98d
12:18:57 AM: deployId: 662ad6ad4da478000804a98f
12:18:57 AM:
12:18:57 AM: ❯ Current directory
12:18:57 AM: /opt/build/repo
12:18:57 AM:
12:18:57 AM: ❯ Config file
12:18:57 AM: /opt/build/repo/netlify.toml
12:18:57 AM:
12:18:57 AM: ❯ Context
12:18:57 AM: production
12:18:57 AM:
12:18:57 AM: ❯ Loading plugins
12:18:57 AM: - netlify-plugin-csp-generator@1.6.1 from netlify.toml and package.json
12:18:58 AM:
12:18:58 AM: @netlify/plugin-functions-install-core (onPreBuild event)
12:18:58 AM: ────────────────────────────────────────────────────────────────
12:18:58 AM:
12:18:58 AM: Installing functions dependencies
12:19:00 AM:
12:19:00 AM: (@netlify/plugin-functions-install-core onPreBuild completed in 1.8s)
12:19:00 AM:
12:19:00 AM: build.command from netlify.toml
12:19:00 AM: ────────────────────────────────────────────────────────────────
12:19:00 AM:
12:19:00 AM: $ bun run astro build
12:19:00 AM: $ astro build
12:19:02 AM: 22:19:02 [build] output: "static"
12:19:02 AM: 22:19:02 [build] directory: /opt/build/repo/dist/
12:19:02 AM: 22:19:02 [build] Collecting build info...
12:19:02 AM: 22:19:02 [build] ✓ Completed in 288ms.
12:19:02 AM: 22:19:02 [build] Building static entrypoints...
12:19:02 AM: 22:19:02 [build] Cache invalid, rebuilding from source. Reason: No content manifest was found in the cache.
12:19:04 AM: 22:19:04 [vite] ✓ built in 1.77s
12:19:04 AM: 22:19:04 [build] ✓ Completed in 1.80s.
12:19:04 AM: building client (vite)
12:19:04 AM: 22:19:04 [vite] transforming...
12:19:04 AM: 22:19:04 [vite] ✓ 8 modules transformed.
12:19:04 AM: 22:19:04 [vite] rendering chunks...
12:19:04 AM: 22:19:04 [vite] computing gzip size...
12:19:04 AM: 22:19:04 [vite] dist/_astro/page.1GeRkbLk.js 2.56 kB │ gzip: 1.12 kB
12:19:04 AM: 22:19:04 [vite] dist/_astro/ImageGallery.astro_astro_type_script_index_0_lang.C9oqKfBc.js 23.12 kB │ gzip: 6.83 kB
12:19:04 AM: 22:19:04 [vite] dist/_astro/photoswipe.esm.C0FT-EY-.js 60.32 kB │ gzip: 17.45 kB
12:19:04 AM: 22:19:04 [vite] ✓ built in 172ms
12:19:04 AM: generating static routes
12:19:04 AM: 22:19:04 ▶ src/pages/404.astro
12:19:04 AM: 22:19:04 └─ /404.html (+8ms)
12:19:04 AM: 22:19:04 ▶ src/pages/articoli/[...slug].astro
12:19:04 AM: 22:19:04 ├─ /articoli/static-content/index.html (+135ms)
12:19:04 AM: 22:19:04 ├─ /articoli/f1/formula-1-gp-del-giappone-uscito-il-rapporto-della-fia/index.html (+51ms)
12:19:04 AM: 22:19:04 ├─ /articoli/f1/regolamento-2023/index.html (+22ms)
12:19:04 AM: 22:19:04 ├─ /articoli/f1/regolamento-2026/index.html (+22ms)
12:19:04 AM: 22:19:04 ├─ /articoli/f1/un-campionato-tutto-al-femminile-ecco-la-f1-academy/index.html (+91ms)
12:19:04 AM: 22:19:04 ├─ /articoli/f1/usciti-i-rapporti-fia-sul-cost-cap-red-bull-e-aston-martin-multate/index.html (+23ms)
12:19:04 AM: 22:19:04 ├─ /articoli/motogp/sprint-race-2023/index.html (+114ms)
12:19:04 AM: 22:19:04 └─ /articoli/motogp/weekend-2023/index.html (+86ms)
12:19:04 AM: 22:19:04 ▶ src/pages/wip.astro
12:19:04 AM: 22:19:04 └─ /wip/index.html (+2ms)
12:19:04 AM: 22:19:04 ✓ Completed in 596ms.
12:19:04 AM:
12:19:04 AM: generating optimized images
12:19:05 AM: 22:19:05 ▶ /_astro/introducing-astro.BRswpisM_2pdN4P.webp (before: 269kB, after: 7kB) (+95ms) (1/19)
12:19:05 AM: 22:19:05 ▶ /_astro/introducing-astro.BRswpisM_ZXaNXk.webp (before: 269kB, after: 45kB) (+245ms) (2/19)
12:19:05 AM: 22:19:05 ▶ /_astro/introducing-astro.BRswpisM_ZpUuHV.webp (before: 269kB, after: 7kB) (+86ms) (3/19)
12:19:05 AM: 22:19:05 ▶ /_astro/f1-academy.HdCBObQg_ZboHnm.webp (before: 61kB, after: 55kB) (+69ms) (4/19)
12:19:05 AM: 22:19:05 ▶ /_astro/aragon.7e9j-yG2_Z24CgJG.webp (before: 181kB, after: 110kB) (+143ms) (5/19)
12:19:05 AM: 22:19:05 ▶ /_astro/aragon.7e9j-yG2_ZsVAbz.webp (before: 181kB, after: 175kB) (+165ms) (6/19)
12:19:05 AM: 22:19:05 ▶ /_astro/aragon.7e9j-yG2_xmddO.webp (before: 181kB, after: 38kB) (+55ms) (7/19)
12:19:06 AM: 22:19:06 ▶ /_astro/f4_art_cover.DJLtEIlz_16lDIG.webp (before: 1373kB, after: 78kB) (+225ms) (8/19)
12:19:06 AM: 22:19:06 ▶ /_astro/f4_art_cover.DJLtEIlz_y08IA.webp (before: 1373kB, after: 82kB) (+176ms) (9/19)
12:19:06 AM: 22:19:06 ▶ /_astro/f4_art_cover.DJLtEIlz_QT7cQ.webp (before: 1373kB, after: 22kB) (+106ms) (10/19)
12:19:06 AM: 22:19:06 ▶ /_astro/moto4.DClGkC0I_pAqHV.webp (before: 288kB, after: 180kB) (+429ms) (11/19)
12:19:06 AM: 22:19:06 ▶ /_astro/leclerc-verstappen.CDE4apjS_2gCJNO.webp (before: 218kB, after: 106kB) (+133ms) (12/19)
12:19:06 AM: 22:19:06 ▶ /_astro/leclerc-verstappen.CDE4apjS_Z2igotv.webp (before: 218kB, after: 22kB) (+47ms) (13/19)
12:19:07 AM: 22:19:07 ▶ /_astro/fia_logo.DyZtTXDG_29AuDo.webp (before: 83kB, after: 61kB) (+144ms) (14/19)
12:19:07 AM: 22:19:07 ▶ /_astro/fia_logo.DyZtTXDG_Z1kwzfF.webp (before: 83kB, after: 16kB) (+33ms) (15/19)
12:19:07 AM: 22:19:07 ▶ /_astro/fia_flag_39.DTB--Gsw_Z4EIjV.webp (before: 84kB, after: 61kB) (+133ms) (16/19)
12:19:07 AM: 22:19:07 ▶ /_astro/fia_flag_39.DTB--Gsw_ZzMLYi.webp (before: 84kB, after: 18kB) (+34ms) (17/19)
12:19:07 AM: 22:19:07 ▶ /_astro/Indonesian_Grand_Prix_2022_-_Race_by_Box_Repsol.DdK23v2T_Z1eszG0.webp (before: 633kB, after: 150kB) (+241ms) (18/19)
12:19:07 AM: 22:19:07 ▶ /_astro/Indonesian_Grand_Prix_2022_-_Race_by_Box_Repsol.DdK23v2T_Z1rGRh8.webp (before: 633kB, after: 26kB) (+99ms) (19/19)
12:19:07 AM: 22:19:07 ✓ Completed in 2.66s.
12:19:07 AM:
12:19:07 AM: 22:19:07 [build] 10 page(s) built in 5.57s
12:19:07 AM: 22:19:07 [build] Complete!
12:19:07 AM:
12:19:07 AM: (build.command completed in 6.8s)
12:19:07 AM:
12:19:07 AM: Functions bundling
12:19:07 AM: ────────────────────────────────────────────────────────────────
12:19:07 AM:
12:19:07 AM: Packaging Functions from netlify/functions directory:
12:19:07 AM: - new-post/index.js
12:19:07 AM:
12:19:08 AM:
12:19:08 AM: (Functions bundling completed in 776ms)
12:19:08 AM:
12:19:08 AM: netlify-plugin-csp-generator (onPostBuild event)
12:19:08 AM: ────────────────────────────────────────────────────────────────
12:19:08 AM:
12:19:08 AM: Excluding 0 files
12:19:08 AM: Found 11 HTML files
12:19:08 AM: Saved at dist/_headers - 0.29 seconds
12:19:08 AM:
12:19:08 AM: (netlify-plugin-csp-generator onPostBuild completed in 423ms)
12:19:08 AM:
12:19:08 AM: Deploy site
12:19:08 AM: ────────────────────────────────────────────────────────────────
12:19:08 AM:
12:19:08 AM: Starting to deploy site from 'dist'
12:19:08 AM: Calculating files to upload
12:19:09 AM: 0 new files to upload
12:19:09 AM: 1 new functions to upload
12:19:15 AM: Post processing - header rules
12:19:15 AM: Starting post processing
12:19:15 AM: Post processing - Forms
12:19:15 AM: Post processing - redirect rules
12:19:15 AM: Post processing done
12:19:15 AM: Section completed: postprocessing
12:19:15 AM: Section completed: deploying
12:19:15 AM: Site deploy was successfully initiated
12:19:15 AM:
12:19:15 AM: (Deploy site completed in 6.8s)
12:19:15 AM:
12:19:15 AM: Netlify Build Complete
12:19:15 AM: ────────────────────────────────────────────────────────────────
12:19:15 AM:
12:19:15 AM: (Netlify Build completed in 18.4s)
12:19:16 AM: Site is live ✨
12:19:16 AM: Caching artifacts
12:19:16 AM: Started saving node modules
12:19:16 AM: Finished saving node modules
12:19:16 AM: Started saving build plugins
12:19:16 AM: Finished saving build plugins
12:19:16 AM: Started saving corepack cache
12:19:16 AM: Finished saving corepack cache
12:19:16 AM: Started saving bun global cache
12:19:16 AM: Finished saving bun global cache
12:19:16 AM: Started saving pip cache
12:19:16 AM: Finished saving pip cache
12:19:16 AM: Started saving emacs cask dependencies
12:19:16 AM: Finished saving emacs cask dependencies
12:19:16 AM: Started saving maven dependencies
12:19:16 AM: Finished saving maven dependencies
12:19:16 AM: Started saving boot dependencies
12:19:16 AM: Finished saving boot dependencies
12:19:16 AM: Started saving rust rustup cache
12:19:16 AM: Finished saving rust rustup cache
12:19:16 AM: Started saving go dependencies
12:19:16 AM: Finished saving go dependencies
12:19:16 AM: Build script success
12:19:16 AM: Section completed: building
12:19:17 AM: Uploading Cache of size 170.4MB
12:19:19 AM: Section completed: cleanup
12:19:19 AM: Finished processing build request in 45.132s
But where are the missing assets? You mentioned we’re not building the dist/content and chunk folders. Could you point us to URLs that should exist but don’t?
Are you willing to share your repo to test this?
I’m ok with it. How should I do privately?
Alright. In the meantime, I’ll try to replicate this on a public test repo
Your website doesn’t appear to build locally:
bun run build
$ astro build
▶ Astro collects anonymous usage data.
This information helps us improve Astro.
Run "astro telemetry disable" to opt-out.
https://astro.build/telemetry
19:42:26 [build] output: "static"
19:42:26 [build] directory: /home/hrishikesh/tickets/f-117044/dist/
19:42:26 [build] Collecting build info...
19:42:26 [build] ✓ Completed in 834ms.
19:42:26 [build] Building static entrypoints...
19:42:26 [build] Cache invalid, rebuilding from source. Reason: No content manifest was found in the cache.
19:42:30 [vite] ✓ built in 3.91s
19:42:30 [build] ✓ Completed in 3.97s.
building client (vite)
19:42:30 [vite] ✓ 8 modules transformed.
19:42:30 [vite] dist/_astro/page.1GeRkbLk.js 2.56 kB │ gzip: 1.12 kB
19:42:30 [vite] dist/_astro/ImageGallery.astro_astro_type_script_index_0_lang.C9oqKfBc.js 23.12 kB │ gzip: 6.83 kB
19:42:30 [vite] dist/_astro/photoswipe.esm.C0FT-EY-.js 60.32 kB │ gzip: 17.45 kB
19:42:30 [vite] ✓ built in 457ms
generating static routes
19:42:31 ▶ src/pages/404.astro
19:42:31 └─ /404.htmlInvalid URL
Stack trace:
at new URL (node:internal/url:796:36)
at AstroComponentInstance.BaseHead [as factory] (file:///home/hrishikesh/tickets/f-117044/dist/chunks/1714918346491/astro/server.mjs:23:12)
at AstroComponentInstance.render (file:///home/hrishikesh/tickets/f-117044/dist/chunks/1714918346491/astro/server.mjs:822:36)
at renderChild (file:///home/hrishikesh/tickets/f-117044/dist/chunks/1714918346491/astro/server.mjs:768:17)
error: script "build" exited with code 1
Ops, sorry about that.
A .env file with these values should fix:
Unfortunately, still the same error.
Alright, I made a min repro: GitHub - Marocco2/test-bun-netlify
This should build without any issues on your end and it will reproduce the bug I’m facing
I also made a test netlify site for this: https://test-bun-netlify.netlify.app
This is all I get built locally with this new repo:
Can you confirm if this is expected? I don’t see any content folder like you mentioned for the previous site.
Nope, it should appear like this:
Make sure branch is
content-collections
Yeah I’m on the right branch, but I don’t see that folder.
What OS are you using? I’m on Ubuntu and if I recall, Astro had an OS-specific bug in the past:
While I agree, the behaviour is strange, I also think this is a problem with how Astro is handling scoped CSS. For example, they say this :
When conflicting CSS rules apply to the same element, browsers first use specificity and then order of appearance to determine which value to show.
and that’s true. However, for some reason, Astro uses :where() selector for scoped styles. According to MDN :
The specificity-adjustment pseudo-class :where() always has its specificity replaced with zero, 0-…
Since Netlify also uses Ubuntu, that could explain why the folder is missing.
I use Windows on my local dev environment. Should I try to use WSL and try to compile it?