Hi I am building with Astro. I see this error when I am trying to make it compatible with GitLab Page. I moved the public folders (and all the related paths) from /public to /static, updated the the config.mjs to include the following:
// GitLab Pages requires exposed files to be located in a folder called "public".
// So we're instructing Astro to put the static build output in a folder of that name.
dist: 'public',
// The folder name Astro uses for static files (`public`) is already reserved
// for the build output. So in deviation from the defaults we're using a folder
// called `static` instead.
public: 'static',
2:40:37 PM: build-image version: 73f16e520fdddf409be6f578c8c2c8941bdf32d3 (focal)
2:40:37 PM: buildbot version: a11acbb405af91d225b392f15bc00822dbffb366
2:40:37 PM: Fetching cached dependencies
2:40:37 PM: Starting to download cache of 246.9MB
2:40:39 PM: Finished downloading cache in 1.484s
2:40:39 PM: Starting to extract cache
2:40:40 PM: Finished extracting cache in 1.649s
2:40:40 PM: Finished fetching cache in 3.191s
2:40:40 PM: Starting to prepare the repo for build
2:40:41 PM: Preparing Git Reference merge-requests/17/head
2:40:44 PM: Starting to install dependencies
2:40:44 PM: Python version set to 3.8
2:40:44 PM: Attempting Ruby version 2.7.2, read from environment
2:40:44 PM: Using Ruby version 2.7.2
2:40:45 PM: Started restoring cached go cache
2:40:45 PM: Finished restoring cached go cache
2:40:45 PM: go version go1.19.12 linux/amd64
2:40:45 PM: Using PHP version 8.0
2:40:46 PM: Started restoring cached Node.js version
2:40:47 PM: Finished restoring cached Node.js version
2:40:47 PM: v18.17.1 is already installed.
2:40:47 PM: Now using node v18.17.1 (npm v9.6.7)
2:40:47 PM: Enabling Node.js Corepack
2:40:47 PM: Started restoring cached build plugins
2:40:47 PM: Finished restoring cached build plugins
2:40:47 PM: Started restoring cached corepack dependencies
2:40:47 PM: Finished restoring cached corepack dependencies
2:40:47 PM: No pnpm workspaces detected
2:40:47 PM: Started restoring cached node modules
2:40:47 PM: Finished restoring cached node modules
2:40:48 PM: Installing npm packages using pnpm version 8.7.1
2:40:48 PM: Lockfile is up to date, resolution step is skipped
2:40:48 PM: Already up to date
2:40:49 PM: Done in 732ms
2:40:49 PM: npm packages installed using pnpm
2:40:49 PM: Install dependencies script success
2:40:49 PM: Starting build script
2:40:50 PM: Detected 1 framework(s)
2:40:50 PM: astro at version 3.0.0
2:40:50 PM: Section completed: initializing
2:40:52 PM:
2:40:52 PM: Netlify Build
2:40:52 PM: ────────────────────────────────────────────────────────────────
2:40:52 PM:
2:40:52 PM: ❯ Version
2:40:52 PM: @netlify/build 29.20.12
2:40:52 PM:
2:40:52 PM: ❯ Flags
2:40:52 PM: baseRelDir: true
2:40:52 PM: buildId: 64ff5ed7e375d80008f39a0f
2:40:52 PM: deployId: 64ff5ed7e375d80008f39a12
2:40:52 PM:
2:40:52 PM: ❯ Current directory
2:40:52 PM: /opt/build/repo
2:40:52 PM:
2:40:52 PM: ❯ Config file
2:40:52 PM: /opt/build/repo/netlify.toml
2:40:52 PM:
2:40:52 PM: ❯ Context
2:40:52 PM: deploy-preview
2:40:52 PM:
2:40:52 PM: ❯ Loading plugins
2:40:52 PM: - @netlify/plugin-lighthouse@5.0.0 from netlify.toml
2:40:53 PM:
2:40:53 PM: build.command from netlify.toml
2:40:53 PM: ────────────────────────────────────────────────────────────────
2:40:53 PM:
2:40:53 PM: $ pnpm run build
2:40:53 PM: > astro-multiverse@23.8.30 build /opt/build/repo
2:40:53 PM: > astro build
2:40:54 PM: 06:40:54 PM [astro] Invalid file extension for Pages: .txt
2:40:54 PM: 06:40:54 PM [content] No content directory found. Skipping type generation.
2:40:54 PM: 06:40:54 PM [build] output target: static
2:40:54 PM: 06:40:54 PM [build] Collecting build info…
2:40:54 PM: 06:40:54 PM [build] Completed in 56ms.
2:40:54 PM: 06:40:54 PM [build] Building static entrypoints…
2:40:55 PM: 06:40:55 PM [build] Completed in 0.89s.
2:40:55 PM:
2:40:55 PM: generating static routes
2:40:55 PM: src/pages/index.astro
2:40:55 PM: └─ /index.html (+27ms)
2:40:55 PM:
2:40:55 PM: generating optimized images
2:40:55 PM: /_astro/01.ef5eec72_1xy1wP.webp (reused cache entry) (+1ms)
2:40:55 PM: /_astro/02.cebceff9_Z6grM1.webp (reused cache entry) (+0ms)
2:40:55 PM: /_astro/03.9e19a493_Z1agwgc.webp (reused cache entry) (+0ms)
2:40:55 PM: /_astro/04.1f4f0112_Z2wHhLD.webp (reused cache entry) (+0ms)
2:40:55 PM: /_astro/05.b6a70450_Z2ivJRF.webp (reused cache entry) (+0ms)
2:40:55 PM: /_astro/06.09fb3c4e_Z1Euzhw.webp (reused cache entry) (+0ms)
2:40:55 PM: Completed in 32ms.
2:40:55 PM:
2:40:55 PM: 06:40:55 PM [build] 1 page(s) built in 0.99s
2:40:55 PM: 06:40:55 PM [build] Complete!
2:40:55 PM:
2:40:55 PM: (build.command completed in 2.1s)
2:40:55 PM:
2:40:55 PM: Deploy site
2:40:55 PM: ────────────────────────────────────────────────────────────────
2:40:55 PM:
2:40:55 PM: Section completed: deploying
2:40:55 PM:
2:40:55 PM: Configuration error
2:40:55 PM: ────────────────────────────────────────────────────────────────
2:40:55 PM:
2:40:55 PM: Error message
2:40:55 PM: Deploy did not succeed: Deploy directory ‘dist’ does not exist
2:40:55 PM:
2:40:55 PM: Resolved config
2:40:55 PM: build:
2:40:55 PM: command: pnpm run build
2:40:55 PM: commandOrigin: config
2:40:55 PM: environment:
2:40:55 PM: - REVIEW_ID
2:40:55 PM: publish: /opt/build/repo/dist
2:40:55 PM: publishOrigin: config
2:40:55 PM: plugins:
2:40:55 PM: - inputs: {}
2:40:55 PM: origin: config
2:40:55 PM: package: ‘@netlify/plugin-lighthouse’
2:40:56 PM: Caching artifacts
2:40:56 PM: Started saving node modules
2:40:56 PM: Finished saving node modules
2:40:56 PM: Started saving build plugins
2:40:56 PM: Finished saving build plugins
2:40:56 PM: Started saving corepack cache
2:40:56 PM: Finished saving corepack cache
2:40:56 PM: Started saving pip cache
2:40:56 PM: Finished saving pip cache
2:40:56 PM: Started saving emacs cask dependencies
2:40:56 PM: Finished saving emacs cask dependencies
2:40:56 PM: Started saving maven dependencies
2:40:56 PM: Finished saving maven dependencies
2:40:56 PM: Started saving boot dependencies
2:40:56 PM: Finished saving boot dependencies
2:40:56 PM: Started saving rust rustup cache
2:40:56 PM: Finished saving rust rustup cache
2:40:56 PM: Started saving go dependencies
2:40:56 PM: Finished saving go dependencies
2:40:56 PM: Build failed due to a user error: Build script returned non-zero exit code: 2
2:40:56 PM: Failing build: Failed to build site
2:40:56 PM: Finished processing build request in 19.109s
How may I debug this? Thanks in advance!