Home
Support Forums

Failed during stage 'building site': Deploy directory '_site' does not exist

I’ve hit a wall trying to deploy my site. First time ever that I’ve had issues deploying on Netlify which just accounts to how great this service is. For the life of me I can’t understand what I am doing incorrectly. The build is passing locally. I have even deleted the node_modules and reinstalled and it works.
I thought it might be the netlify.toml file:

[build]
  publish = "_site"
  command = "build"

Deleting this didn’t change anything. I’ve set environment variables for node version and also the node_env. I’ve been going around in circles and would really appreciate any guidance of how to solve this. Even if it’s just a way to show more debuggng messages.

hey there,

This guide will surely contain some useful information:

If the error still persists,

can you please post:

  • your site name
  • a deploy log
  • your package.json file
  • a screenshot of your build settings in the UI

and we’ll be happy to advise :+1:

Thanks for the help. I changed the publish to dist and now it builds. I have no idea why _site was not working but at least it’s working now.