Netlify has been chugging along just fine for us but now that Nuxt 3 has updated to RC1 we’re having a tough time building properly on Netlify. Here’s the most recent error we’re having.
Site name: beta.tabs.to
Build log below:
Deploy failed
Build ready to start
4:42:17 PM: Fetching cached dependencies
4:42:17 PM: Starting to download cache of 177.9MB
4:42:23 PM: Finished downloading cache in 6.136846679s
4:42:23 PM: Starting to extract cache
4:42:28 PM: Finished extracting cache in 4.648187788s
4:42:28 PM: Finished fetching cache in 10.808986388s
4:42:28 PM: Starting to prepare the repo for build
4:42:28 PM: Preparing Git Reference refs/heads/main
4:42:29 PM: Parsing package.json dependencies
4:42:30 PM: Starting build script
4:42:30 PM: Installing dependencies
4:42:30 PM: Python version set to 2.7
4:42:30 PM: Started restoring cached node version
4:42:31 PM: Finished restoring cached node version
4:42:31 PM: v16.14.2 is already installed.
4:42:32 PM: Now using node v16.14.2 (npm v8.5.0)
4:42:32 PM: Started restoring cached build plugins
4:42:32 PM: Finished restoring cached build plugins
4:42:32 PM: Attempting ruby version 2.7.2, read from environment
4:42:33 PM: Using ruby version 2.7.2
4:42:33 PM: Using PHP version 8.0
4:42:34 PM: No npm workspaces detected
4:42:34 PM: Started restoring cached node modules
4:42:34 PM: Finished restoring cached node modules
4:42:34 PM: Started restoring cached go cache
4:42:34 PM: Finished restoring cached go cache
4:42:34 PM: go version go1.16.5 linux/amd64
4:42:34 PM: go version go1.16.5 linux/amd64
4:42:34 PM: Installing missing commands
4:42:34 PM: Verify run directory
4:42:35 PM:
4:42:35 PM: ────────────────────────────────────────────────────────────────
4:42:35 PM: Netlify Build
4:42:35 PM: ────────────────────────────────────────────────────────────────
4:42:35 PM:
4:42:35 PM: ❯ Version
4:42:35 PM: @netlify/build 27.0.1
4:42:35 PM:
4:42:35 PM: ❯ Flags
4:42:35 PM: baseRelDir: true
4:42:35 PM: buildId: 62633d57343e8b000817c30e
4:42:35 PM: deployId: 62633d57343e8b000817c310
4:42:35 PM:
4:42:35 PM: ❯ Current directory
4:42:35 PM: /opt/build/repo
4:42:35 PM:
4:42:35 PM: ❯ Config file
4:42:35 PM: /opt/build/repo/netlify.toml
4:42:35 PM:
4:42:35 PM: ❯ Context
4:42:35 PM: production
4:42:35 PM:
4:42:35 PM: ────────────────────────────────────────────────────────────────
4:42:35 PM: 1. build.command from netlify.toml
4:42:35 PM: ────────────────────────────────────────────────────────────────
4:42:35 PM:
4:42:35 PM: $ nuxt build
4:42:35 PM: [log] Nuxt CLI v3.0.0-rc.1
4:42:40 PM: [info] [nuxt:tailwindcss] Using Tailwind CSS from ~/assets/css/tailwind.scss
4:42:40 PM: [info] [nuxt:tailwindcss] Merging Tailwind config from ~/tailwind.config.js
4:42:40 PM: [log] [@nuxtjs/algolia] Module loaded correctly
4:42:53 PM: [info] Vite client warmed up in 12511ms
4:43:02 PM: [warn]
4:43:02 PM: (!) Some chunks are larger than 500 KiB after minification. Consider:
4:43:02 PM: - Using dynamic import() to code-split the application
4:43:02 PM: - Use build.rollupOptions.output.manualChunks to improve chunking: rollup.js
4:43:02 PM: - Adjust chunk size limit for this warning via build.chunkSizeWarningLimit.
4:43:02 PM: [info] Client built in 21068ms
4:43:02 PM: [info] Building server…
4:43:09 PM: [success] Server built in 6776ms
4:43:09 PM: [error] ENOENT: no such file or directory, mkdir ‘/opt/build/repo/dist’
4:43:09 PM:
4:43:09 PM: ────────────────────────────────────────────────────────────────
4:43:09 PM: “build.command” failed
4:43:09 PM: ────────────────────────────────────────────────────────────────
4:43:09 PM:
4:43:09 PM: Error message
4:43:09 PM: Command failed with exit code 1: nuxt build (Search results for '"non-zero exit code: 1"' - Netlify Support Forums)
4:43:09 PM:
4:43:09 PM: Error location
4:43:09 PM: In build.command from netlify.toml:
4:43:09 PM: nuxt build
4:43:09 PM:
4:43:09 PM: Resolved config
4:43:09 PM: build:
4:43:09 PM: command: nuxt build
4:43:10 PM: Creating deploy upload records
4:43:09 PM: commandOrigin: config
4:43:09 PM: environment:
4:43:09 PM: - ALGOLIA_APPLICATION_ID
4:43:09 PM: - ALGOLIA_SEARCH_API_KEY
4:43:09 PM: - ENV
4:43:09 PM: - FIREBASE_API_KEY
4:43:10 PM: Failed during stage ‘building site’: Build script returned non-zero exit code: 2 (Search results for '"non-zero exit code: 2"' - Netlify Support Forums)
4:43:09 PM: - FIREBASE_APP_ID
4:43:09 PM: - FIREBASE_AUTH_DOMAIN
4:43:09 PM: - FIREBASE_MEASUREMENT_ID
4:43:09 PM: - FIREBASE_MESSAGING_SENDER_ID
4:43:09 PM: - FIREBASE_PROJECT_ID
4:43:09 PM: - FIREBASE_STORAGE_BUCKET
4:43:09 PM: - SENTRY_DSN
4:43:09 PM: publish: /opt/build/repo/dist
4:43:09 PM: publishOrigin: config
4:43:09 PM: functionsDirectory: /opt/build/repo/netlify/functions
4:43:09 PM: Caching artifacts
4:43:09 PM: Started saving node modules
4:43:09 PM: Finished saving node modules
4:43:09 PM: Started saving build plugins
4:43:09 PM: Finished saving build plugins
4:43:09 PM: Started saving pip cache
4:43:10 PM: Finished saving pip cache
4:43:10 PM: Started saving emacs cask dependencies
4:43:10 PM: Finished saving emacs cask dependencies
4:43:10 PM: Started saving maven dependencies
4:43:10 PM: Finished saving maven dependencies
4:43:10 PM: Started saving boot dependencies
4:43:10 PM: Finished saving boot dependencies
4:43:10 PM: Started saving rust rustup cache
4:43:10 PM: Finished saving rust rustup cache
4:43:10 PM: Started saving go dependencies
4:43:10 PM: Finished saving go dependencies
4:43:10 PM: Build failed due to a user error: Build script returned non-zero exit code: 2
4:43:10 PM: Failing build: Failed to build site
4:43:10 PM: Finished processing build request in 52.896034429s
Thanks so much for your patience here. The support team has been a bit underwater this week and it has impacted our response times. Can you please share a URL to the sites that are impacted by this, as well as the most recent build log?
Hi @perry, if it were mine you wanted, here they are:
No netlify.toml
Pretty slimmed nuxt config:
import { defineNuxtConfig } from 'nuxt'
export default defineNuxtConfig({
runtimeConfig: {
// The private keys which are only available within server-side
// Keys within public, will be also exposed to the client-side
public: {
ctfSpaceId: '',
ctfAccessToken: '',
ctfHost: '',
ctfPreviewAccessToken: '',
ctfPreviewHost: '',
}
},
telemetry: true,
buildModules: [
'@pinia/nuxt', // state
'@nuxtjs/tailwindcss', // css
],
})
But i’ve tried lots of stuff so this is just the last attempt
I’ve abandoned this repo though and gone back to nuxt 2 for this project, for this and other reasons, it doesn’t seem like Nuxt 3 is quite ready for prime time.
We can troubleshoot it if you want to understand the problem.
Other people in the thread might have more pressing issues
Man, I’m switching to another provider. My site was fine, never updated to Nuxt 3, and I still can’t update my site when I revise and continue building. The worst part is I started from scratch thinking that I did something wrong. This is messed up!
Builds fail, with an exit code 1 for a myriad of reasons so we’d need to investigate your particular situation. We understand you’re considering switching to another provider but we’re happy to help you troubleshoot. Could you provide the name of one of the sites experiencing the issue. Perhaps a link to a failed deploy?