Deploy directory 'build' does not exist

I am having trouble building my site. Could anyone help me, i might be new to this.
I will paste the log below.

11:45:48 PM: Build ready to start
11:45:50 PM: build-image version: 53b83b6bede2920f236b25b6f5a95334320dc849
11:45:50 PM: build-image tag: v3.6.0
11:45:50 PM: buildbot version: ea3eb03398025784c75f45be14efdf8ec3494de0
11:45:50 PM: Fetching cached dependencies
11:45:50 PM: Failed to fetch cache, continuing with build
11:45:50 PM: Starting to prepare the repo for build
11:45:51 PM: No cached dependencies found. Cloning fresh repo
11:45:51 PM: git clone https://github.com/Aamjit/Aamjit.github.io
11:45:52 PM: Preparing Git Reference refs/heads/master
11:45:53 PM: Different publish path detected, going to use the one specified in the Netlify configuration file: β€˜build’ versus β€˜build/’ in the Netlify UI
11:45:53 PM: Starting build script
11:45:53 PM: Installing dependencies
11:45:53 PM: Python version set to 2.7
11:45:55 PM: v12.18.0 is already installed.
11:45:55 PM: Now using node v12.18.0 (npm v6.14.4)
11:45:55 PM: Started restoring cached build plugins
11:45:55 PM: Finished restoring cached build plugins
11:45:55 PM: Attempting ruby version 2.7.1, read from environment
11:45:57 PM: Using ruby version 2.7.1
11:45:57 PM: Using PHP version 5.6
11:45:57 PM: Started restoring cached node modules
11:45:57 PM: Finished restoring cached node modules
11:45:58 PM: Installing NPM modules using NPM version 6.14.4
11:46:34 PM: > core-js@2.6.12 postinstall /opt/build/repo/node_modules/babel-runtime/node_modules/core-js
11:46:34 PM: > node -e β€œtry{require(’./postinstall’)}catch(e){}”
11:46:34 PM: > core-js@3.8.1 postinstall /opt/build/repo/node_modules/core-js
11:46:34 PM: > node -e β€œtry{require(’./postinstall’)}catch(e){}”
11:46:34 PM: > core-js-pure@3.8.1 postinstall /opt/build/repo/node_modules/core-js-pure
11:46:34 PM: > node -e β€œtry{require(’./postinstall’)}catch(e){}”
11:46:34 PM: > ejs@2.7.4 postinstall /opt/build/repo/node_modules/ejs
11:46:34 PM: > node ./postinstall.js
11:46:37 PM: npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.13 (node_modules/webpack-dev-server/node_modules/fsevents):
11:46:37 PM: npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.13: wanted {β€œos”:β€œdarwin”,β€œarch”:β€œany”} (current: {β€œos”:β€œlinux”,β€œarch”:β€œx64”})
11:46:37 PM: npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.13 (node_modules/watchpack-chokidar2/node_modules/fsevents):
11:46:37 PM: npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.13: wanted {β€œos”:β€œdarwin”,β€œarch”:β€œany”} (current: {β€œos”:β€œlinux”,β€œarch”:β€œx64”})
11:46:37 PM: npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@2.2.1 (node_modules/fsevents):
11:46:37 PM: npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@2.2.1: wanted {β€œos”:β€œdarwin”,β€œarch”:β€œany”} (current: {β€œos”:β€œlinux”,β€œarch”:β€œx64”})
11:46:37 PM: npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@2.1.3 (node_modules/chokidar/node_modules/fsevents):
11:46:37 PM: npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@2.1.3: wanted {β€œos”:β€œdarwin”,β€œarch”:β€œany”} (current: {β€œos”:β€œlinux”,β€œarch”:β€œx64”})
11:46:37 PM: added 1956 packages from 757 contributors and audited 1960 packages in 38.554s
11:46:39 PM: 121 packages are looking for funding
11:46:39 PM: run npm fund for details
11:46:39 PM: found 0 vulnerabilities
11:46:39 PM: NPM modules installed
11:46:39 PM: Started restoring cached go cache
11:46:39 PM: Finished restoring cached go cache
11:46:39 PM: go version go1.14.4 linux/amd64
11:46:39 PM: go version go1.14.4 linux/amd64
11:46:39 PM: Installing missing commands
11:46:39 PM: Verify run directory
11:46:41 PM: ​
11:46:41 PM: ────────────────────────────────────────────────────────────────
11:46:41 PM: Netlify Build
11:46:41 PM: ────────────────────────────────────────────────────────────────
11:46:41 PM: ​
11:46:41 PM: ❯ Version
11:46:41 PM: @netlify/build 7.0.2
11:46:41 PM: ​
11:46:41 PM: ❯ Flags
11:46:41 PM: deployId: 5fd7abd4009a840bf71189d9
11:46:41 PM: mode: buildbot
11:46:41 PM: ​
11:46:41 PM: ❯ Current directory
11:46:41 PM: /opt/build/repo
11:46:41 PM: ​
11:46:41 PM: ❯ Config file
11:46:41 PM: No config file was defined: using default values.
11:46:41 PM: ​
11:46:41 PM: ❯ Context
11:46:41 PM: production
11:46:41 PM: ​
11:46:41 PM: ❯ Installing plugins
11:46:41 PM: - netlify-plugin-a11y@0.0.12
11:46:53 PM: ​
11:46:53 PM: ❯ Loading plugins
11:46:53 PM: - netlify-plugin-a11y@0.0.12 from Netlify app
11:46:54 PM: ​
11:46:54 PM: ────────────────────────────────────────────────────────────────
11:46:54 PM: 1. Build command from Netlify app
11:46:54 PM: ────────────────────────────────────────────────────────────────
11:46:54 PM: ​
11:46:54 PM: $ CI=β€œnpm run build”
11:46:54 PM: ​
11:46:54 PM: (build.command completed in 15ms)
11:46:54 PM: ​
11:46:54 PM: ────────────────────────────────────────────────────────────────
11:46:54 PM: 2. onPostBuild command from netlify-plugin-a11y
11:46:54 PM: ────────────────────────────────────────────────────────────────
11:46:54 PM: ​
11:46:54 PM: Folder build/ was provided in β€œcheckPaths”, but does not exist - it either indicates something went wrong with your build, or you can simply delete this folder from your β€œcheckPaths” in netlify.toml
11:46:54 PM: ​
11:46:54 PM: (netlify-plugin-a11y onPostBuild completed in 7ms)
11:46:54 PM: ​
11:46:54 PM: ────────────────────────────────────────────────────────────────
11:46:54 PM: Netlify Build Complete
11:46:54 PM: ────────────────────────────────────────────────────────────────
11:46:54 PM: ​
11:46:54 PM: (Netlify Build completed in 13s)
11:46:54 PM: Caching artifacts
11:46:54 PM: Started saving node modules
11:46:54 PM: Finished saving node modules
11:46:54 PM: Started saving build plugins
11:46:54 PM: Finished saving build plugins
11:46:54 PM: Started saving pip cache
11:46:54 PM: Finished saving pip cache
11:46:54 PM: Started saving emacs cask dependencies
11:46:54 PM: Finished saving emacs cask dependencies
11:46:54 PM: Started saving maven dependencies
11:46:54 PM: Finished saving maven dependencies
11:46:54 PM: Started saving boot dependencies
11:46:54 PM: Finished saving boot dependencies
11:46:54 PM: Started saving rust rustup cache
11:46:54 PM: Finished saving rust rustup cache
11:46:54 PM: Started saving rust cargo bin cache
11:46:54 PM: Finished saving rust cargo bin cache
11:46:54 PM: Started saving go dependencies
11:46:54 PM: Finished saving go dependencies
11:46:57 PM: Build script success
11:46:57 PM: Deploy directory β€˜build’ does not exist
11:46:57 PM: Failing build: Failed to build site
11:46:57 PM: Failed during stage β€˜building site’: Deploy directory β€˜build’ does not exist
11:46:57 PM: Finished processing build request in 1m6.844381579s

Hiya, sorry you are having trouble with your build.

This Support Guide contains a ton of useful debugging tips that can likely help you solve your problem :slight_smile:

We also recommend trying to search the forums with the build error you encountered - it’s likely your question was already asked by someone else!

If you are still having problems, please provide as much information as you can on what you have already tried, what your build settings are, your package.json, etc. Thanks!

1 Like

I will paste down my gtihub repo, I did the npm run build and created the build directory. Could be a problem with my package.json file.

Hi, @Aamjit. Your build command is set to this here:

CI="npm run build"

However, it should just be this:

npm run build

If there are other questions, please let us know.