Build fails dist folder not found

────────────────────────────────────────────────────────────────
5:42:46 PM: Configuration error
5:42:46 PM: ────────────────────────────────────────────────────────────────
5:42:46 PM: ​
5:42:46 PM: Error message
5:42:46 PM: Deploy did not succeed: Deploy directory ‘dist’ does not exist
5:42:46 PM: ​
5:42:46 PM: Resolved config
5:42:46 PM: build:
5:42:46 PM: base: /opt/build/repo
5:42:46 PM: command: yarn build
5:42:46 PM: commandOrigin: ui
5:42:46 PM: publish: /opt/build/repo/dist
5:42:46 PM: publishOrigin: ui
5:42:47 PM: Caching artifacts
5:42:47 PM: Started saving node modules
5:42:47 PM: Finished saving node modules
5:42:47 PM: Started saving build plugins
5:42:47 PM: Finished saving build plugins
5:42:47 PM: Started saving yarn cache
5:42:52 PM: Finished saving yarn cache
5:42:52 PM: Started saving pip cache
5:42:52 PM: Finished saving pip cache
5:42:52 PM: Started saving emacs cask dependencies
5:42:52 PM: Finished saving emacs cask dependencies
5:42:52 PM: Started saving maven dependencies
5:42:52 PM: Finished saving maven dependencies
5:42:52 PM: Started saving boot dependencies
5:42:52 PM: Finished saving boot dependencies
5:42:52 PM: Started saving rust rustup cache
5:42:52 PM: Finished saving rust rustup cache
5:42:52 PM: Started saving go dependencies
5:42:52 PM: Finished saving go dependencies
5:42:53 PM: Build failed due to a user error: Build script returned non-zero exit code: 2
5:42:53 PM: Creating deploy upload records
5:42:54 PM: Failing build: Failed to build site
5:42:54 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)
5:42:54 PM: Finished processing build request in 1m59.921162145s

I am using the same deploy settings as my other website, which is the same codebase, its a nuxt website, not sure why its not building I can build on my local machine.

This is the same settings I have on both sites one works this one does not ?

Base directory
/
Build command
yarn build
Publish directory
/dist

Hi @nomadmike

Can you share the repository you are deploying from?

I checked the setting and changed yarn build to nuxt generate and my site deployed, yet the same command is used on another site and worked just fine?