Hello, I’m working on a Nuxt.js project and I’m getting the error in my title.
Failed during stage 'building site': Deploy directory 'dist' does not exist
I was thinking this might be because I hadn’t created my dist folder, so I did this with nuxt generate, and the dist folder now exists in my project, but I can’t see it up on my Github repo. Would this be the problem?
I recently deployed a Vue.js site on Netlify, but it worked fine while I was still missing my dist folder in my Github repo.
Thank you for this @Scott.
I tried entering npm run build for my build command, left dist as the publish directory, but I’m still getting Deploy directory 'dist' does not exist. Am I missing something?
I am not so sure about this and would like to keep the discussion going.
I have had the same issue and solved it by changing the command to npm run generate instead of npm run build.
but what is going on behind the scenes, I’d like to understand the steps.
with npm run build, no dist folder was found and therefore deploy returned an error. but to build the page locally and push a dist folder by removing it from the gitignore seems wrong to me, why in the first place is it listed in the gitignore then?!
here is what I did: created the nuxt project and pushed content to master (without a dist folder). am I right that the dist is being build by netlify as soon as I push to master (bc of the npm run generate command). meaning there is no need to remove .nuxt and dist from the gitignore file.
thank you work for me, before use npm run generate i use npm run build and and it failed I looked for a solution and found it you said use npm run generate and it was very useful for me thank you
This was my issue. My web-build folder for my React Native project was in the .gitignore and so was getting this error that the web-build folder doesn’t exist.