Dist directory doesnt exist

Im trying to deploy my site in netlify from Github, the deployment attempt fails with this following message
“Deploy did not succeed: Deploy directory ‘dist’ does not exist”
whats the dist directory and how i can generate it? or how i can solve this problem.

ill copy my packahe.json scripts below


"scripts": {
    "watch:sass": "node-sass SASS/main.scss CSS/style.css -w",
    "devserver" : "live-server",
    "start" : "npm-run-all --parallel devserver watch:sass",
    "compile:sass": "node-sass SASS/main.scss CSS/style.comp.css",
    "concat:css": "concat -o CSS/style.concat.css CSS/style.comp.css",
    "compress:css": "node-sass CSS/style.concat.css --output-style compressed",
    "build:css" : "npm-run-all compile:sass concat:css compress:css"

It expects there to be a directory called “dist” that has the code you have built/want to deploy in it. So whatever you have told your scripts to do possibly does not involve telling them to build to that directory.

thank you very much , how i can get my script to build that directory?

You’re outputting the css to a directory called CSS, I assume it needs to be dist/CSS/. And the rest of your code needs to be built to there as well, else netlify will just deploy a folder with some CSS

How do your Build settings look?

I have some old tutorial sites on GitHub using Netlify and they work without a build directory. With SCSS and a package.json that looks a lot like yours. When I look at the build settings they are all empty (Base directory, Build command, Publish directory). As far as I know, they still build correctly.

You can look at the deploy docs as well.

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.