Build with custom publish directory suddenly failing with no changes

Just had my builds start failing due to “Deploy did not succeed: Deploy directory ‘dist’ does not exist”. This started happening ~10 mins ago on 2 different projects, so unless I really messed something up I think this might be on Netlify’s end. They both have a custom base & publish directory, since they use the same monorepo.

Relevant build logs from one of them:

1:48:54 PM: ────────────────────────────────────────────────────────────────
1:48:54 PM:   1. Build command from Netlify app                             
1:48:54 PM: ────────────────────────────────────────────────────────────────
1:48:54 PM: ​
1:48:54 PM: $ yarn build
1:48:54 PM: yarn run v1.22.4
1:48:54 PM: $ cross-env NODE_ENV=production webpack
1:48:55 PM: Building commit d2728ee79bae40c47a9bff6838c6a3eecf3296f5
1:48:55 PM: Building commit d2728ee79bae40c47a9bff6838c6a3eecf3296f5
1:49:16 PM: (node:1753) [DEP0148] DeprecationWarning: Use of deprecated folder mapping "./" in the "exports" field module resolution of the package at /opt/build/repo/widget/node_modules/css-loader/node_modules/postcss/package.json.
1:49:16 PM: Update this package.json to use a subpath pattern like "./*".
1:49:16 PM: (Use `node --trace-deprecation ...` to show where the warning was created)
1:49:44 PM: Webpack Bundle Analyzer saved report to /opt/build/repo/widget/dist/bundle-analysis.html
1:49:47 PM: Webpack Bundle Analyzer saved report to /opt/build/repo/widget/dist/bundle-analysis.debug.html
1:49:47 PM: Hash: ec7b78c2404dcae2bdcd80f6de0c9b14ddde0d05
1:49:47 PM: Version: webpack 4.44.1
1:49:47 PM: Child
1:49:47 PM:     Hash: ec7b78c2404dcae2bdcd
1:49:47 PM:     Time: 46004ms
1:49:47 PM:     Built at: 07/15/2021 6:49:43 PM
1:49:47 PM:                                           Asset      Size  Chunks                                Chunk Names
1:49:47 PM:                 assets/DMSans-Bold.da49214b.ttf  70.1 KiB          [emitted] [immutable]
1:49:47 PM:               assets/DMSans-Medium.f4583469.ttf    70 KiB          [emitted] [immutable]
1:49:47 PM:              assets/DMSans-Regular.067ebd7e.ttf  70.2 KiB          [emitted] [immutable]
1:49:47 PM:     assets/info-panel-widget-large.364a18b7.png  22.3 KiB          [emitted] [immutable]
1:49:47 PM:     assets/info-panel-widget-small.08b0876c.png  15.4 KiB          [emitted] [immutable]
1:49:47 PM:                                         main.js   586 KiB       0  [emitted]              [big]  main
1:49:47 PM:     Entrypoint main [big] = main.js
1:49:47 PM:       [0] ./node_modules/@babel/runtime/regenerator/index.js 49 bytes {0} [built]
1:49:47 PM:       [3] ./node_modules/@babel/runtime/helpers/slicedToArray.js 522 bytes {0} [built]
1:49:47 PM:       [4] ./node_modules/detectrtc/DetectRTC.js 40.5 KiB {0} [built]
1:49:47 PM:      [14] ./node_modules/@babel/runtime/helpers/typeof.js 723 bytes {0} [built]
1:49:47 PM:      [18] ./node_modules/@babel/runtime/helpers/toConsumableArray.js 521 bytes {0} [built]
1:49:47 PM:      [19] ./node_modules/@babel/runtime/helpers/defineProperty.js 367 bytes {0} [built]
1:49:47 PM:      [29] ./node_modules/recaptcha-v3/dist/ReCaptcha.js 348 bytes {0} [built]
1:49:47 PM:      [67] ./node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js 609 bytes {0} [built]
1:49:47 PM:     [109] ./node_modules/@babel/runtime/helpers/arrayWithoutHoles.js 266 bytes {0} [built]
1:49:47 PM:     [110] ./node_modules/@babel/runtime/helpers/iterableToArray.js 246 bytes {0} [built]
1:49:47 PM:     [111] ./node_modules/@babel/runtime/helpers/nonIterableSpread.js 308 bytes {0} [built]
1:49:47 PM:     [112] ./node_modules/@babel/runtime/helpers/arrayWithHoles.js 184 bytes {0} [built]
1:49:47 PM:     [113] ./node_modules/@babel/runtime/helpers/iterableToArrayLimit.js 683 bytes {0} [built]
1:49:47 PM:     [114] ./node_modules/@babel/runtime/helpers/nonIterableRest.js 309 bytes {0} [built]
1:49:47 PM:     [173] ./src/embed.ts + 210 modules 947 KiB {0} [built]
1:49:47 PM:           | ./src/embed.ts 864 bytes [built]
1:49:47 PM:           | ./src/index.ts 14.1 KiB [built]
1:49:47 PM:           | ./node_modules/@reduxjs/toolkit/dist/redux-toolkit.esm.js 49.6 KiB [built]
1:49:47 PM:           | ./src/app/types/index.ts 744 bytes [built]
1:49:47 PM:           | ./src/app/utils/index.ts 9.52 KiB [built]
1:49:47 PM:           | ./src/app/log.ts 3.95 KiB [built]
1:49:47 PM:           | ./src/app/user-agent.ts 3.82 KiB [built]
1:49:47 PM:           | ./src/utils/options.ts 8.47 KiB [built]
1:49:47 PM:           | ./src/app/rrweb.ts 3.54 KiB [built]
1:49:47 PM:           | ./src/app/utils/call-query.ts 4.48 KiB [built]
1:49:47 PM:           | ./src/app/realtime.ts 46 KiB [built]
1:49:47 PM:           | ./src/app/slices.ts 29.8 KiB [built]
1:49:47 PM:           | ./src/app/store.ts 808 bytes [built]
1:49:47 PM:           | ./src/app/index.tsx 8.2 KiB [built]
1:49:47 PM:           | ./src/utils/intercom.ts 2.45 KiB [built]
1:49:47 PM:           |     + 196 hidden modules
1:49:47 PM:         + 172 hidden modules
1:49:47 PM: Child
1:49:47 PM:     Hash: 80f6de0c9b14ddde0d05
1:49:47 PM:     Time: 49842ms
1:49:47 PM:     Built at: 07/15/2021 6:49:47 PM
1:49:47 PM:                                           Asset      Size  Chunks                                Chunk Names
1:49:47 PM:                 assets/DMSans-Bold.da49214b.ttf  70.1 KiB          [emitted] [immutable]
1:49:47 PM:               assets/DMSans-Medium.f4583469.ttf    70 KiB          [emitted] [immutable]
1:49:47 PM:              assets/DMSans-Regular.067ebd7e.ttf  70.2 KiB          [emitted] [immutable]
1:49:47 PM:     assets/info-panel-widget-large.364a18b7.png  22.3 KiB          [emitted] [immutable]
1:49:47 PM:     assets/info-panel-widget-small.08b0876c.png  15.4 KiB          [emitted] [immutable]
1:49:47 PM:                                   main.debug.js   679 KiB       0  [emitted]              [big]  main
1:49:47 PM:                               main.debug.js.map  2.16 MiB       0  [emitted] [dev]               main
1:49:47 PM:     Entrypoint main [big] = main.debug.js main.debug.js.map
1:49:47 PM:       [0] ./node_modules/@babel/runtime/regenerator/index.js 49 bytes {0} [built]
1:49:47 PM:       [4] ./node_modules/@babel/runtime/helpers/slicedToArray.js 522 bytes {0} [built]
1:49:47 PM:       [5] ./node_modules/detectrtc/DetectRTC.js 40.5 KiB {0} [built]
1:49:47 PM:      [15] ./node_modules/@babel/runtime/helpers/typeof.js 723 bytes {0} [built]
1:49:47 PM:      [19] ./node_modules/@babel/runtime/helpers/toConsumableArray.js 521 bytes {0} [built]
1:49:47 PM:      [20] ./node_modules/@babel/runtime/helpers/defineProperty.js 367 bytes {0} [built]
1:49:47 PM:      [30] ./node_modules/recaptcha-v3/dist/ReCaptcha.js 348 bytes {0} [built]
1:49:47 PM:      [68] ./node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js 609 bytes {0} [built]
1:49:47 PM:     [110] ./node_modules/@babel/runtime/helpers/arrayWithoutHoles.js 266 bytes {0} [built]
1:49:47 PM:     [111] ./node_modules/@babel/runtime/helpers/iterableToArray.js 246 bytes {0} [built]
1:49:47 PM:     [112] ./node_modules/@babel/runtime/helpers/nonIterableSpread.js 308 bytes {0} [built]
1:49:47 PM:     [113] ./node_modules/@babel/runtime/helpers/arrayWithHoles.js 184 bytes {0} [built]
1:49:47 PM:     [114] ./node_modules/@babel/runtime/helpers/iterableToArrayLimit.js 683 bytes {0} [built]
1:49:47 PM:     [115] ./node_modules/@babel/runtime/helpers/nonIterableRest.js 309 bytes {0} [built]
1:49:47 PM:     [174] ./src/embed.ts + 210 modules 947 KiB {0} [built]
1:49:47 PM:           | ./src/embed.ts 864 bytes [built]
1:49:47 PM:           | ./src/index.ts 14.1 KiB [built]
1:49:47 PM:           | ./node_modules/@reduxjs/toolkit/dist/redux-toolkit.esm.js 49.6 KiB [built]
1:49:47 PM:           | ./src/app/types/index.ts 744 bytes [built]
1:49:47 PM:           | ./src/app/utils/index.ts 9.52 KiB [built]
1:49:47 PM:           | ./src/app/log.ts 3.95 KiB [built]
1:49:47 PM:           | ./src/app/user-agent.ts 3.82 KiB [built]
1:49:47 PM:           | ./src/utils/options.ts 8.47 KiB [built]
1:49:47 PM:           | ./src/app/rrweb.ts 3.54 KiB [built]
1:49:47 PM:           | ./src/app/utils/call-query.ts 4.48 KiB [built]
1:49:47 PM:           | ./src/app/realtime.ts 46 KiB [built]
1:49:47 PM:           | ./src/app/slices.ts 29.8 KiB [built]
1:49:47 PM:           | ./src/app/store.ts 808 bytes [built]
1:49:47 PM:           | ./src/app/index.tsx 8.2 KiB [built]
1:49:47 PM:           | ./src/utils/intercom.ts 2.45 KiB [built]
1:49:47 PM:           |     + 196 hidden modules
1:49:47 PM:         + 173 hidden modules
1:49:47 PM: Done in 53.33s.
1:49:47 PM: ​
1:49:47 PM: (build.command completed in 53.5s)
1:49:47 PM: 
1:49:47 PM: ────────────────────────────────────────────────────────────────
1:49:47 PM:   2. Deploy site                                                
1:49:47 PM: ────────────────────────────────────────────────────────────────
1:49:47 PM: ​
1:49:47 PM: ​
1:49:47 PM: ────────────────────────────────────────────────────────────────
1:49:47 PM:   Configuration error                                           
1:49:47 PM: ────────────────────────────────────────────────────────────────
1:49:47 PM: ​
1:49:47 PM:   Error message
1:49:47 PM:   Deploy did not succeed: Deploy directory 'dist' does not exist
1:49:47 PM: ​
1:49:47 PM:   Resolved config
1:49:47 PM:   build:
1:49:47 PM:     base: /opt/build/repo/widget
1:49:47 PM:     command: yarn build
1:49:47 PM:     commandOrigin: ui
1:49:47 PM:     publish: /opt/build/repo/widget/dist
1:49:47 PM:     publishOrigin: ui
1:49:47 PM:   headers:
1:49:48 PM:     - for: /*
3 Likes

Here’s a deploy log from the one that succeeded just before this:

12:19:13 PM: ────────────────────────────────────────────────────────────────
12:19:13 PM:   2. Deploy site                                                
12:19:13 PM: ────────────────────────────────────────────────────────────────
12:19:13 PM: ​
12:19:13 PM: Starting to deploy site from 'widget/dist'
12:19:13 PM: Creating deploy tree 
12:19:13 PM: 5 new files to upload
12:19:13 PM: 0 new functions to upload
12:19:13 PM: Site deploy was successfully initiated

Given that it calls it widget/dist here, but the error above says dist, it looks like it’s not respecting the config suddenly.

Same here. It was working a couple of minutes ago.

This seems like an issue on Netlify’s end. Let me escalate this and a support engineer will be on the case asap

4 Likes

Happening to me as well. I retried old, previously successful builds as well with no luck.

Hang in there. We’ll get this sorted for you soon :slightly_smiling_face:

3 Likes

Yep happening here too, terrible timing.

Same for me. I just submitted a support request, should have come here first… Wasted one hour reviewing my configuration and running local builds.

2 Likes

We are also experiencing this same critical issue on all of our sites. In our case, we have a custom nested directory xxxx/build, but the error shows Deploy did not succeed: Deploy directory 'build' does not exist. The nested path appears to not be respected.

As an extra detail, I’ve noticed this has been happening for a while but never really paid it any attention as everything still seemed to work, but I get this at the top of my build:

8:46:03 PM: Different publish path detected, going to use the one specified in the Netlify configuration file: 'web/www' versus 'www' in the Netlify UI
8:46:03 PM: Different functions path detected, going to use the one specified in the Netlify configuration file: 'web/functions' versus '' in the Netlify UI

However I don’t have any configuration in my netlify.toml relating to the build path or the functions path - so I don’t know where this warning is coming from.

Hi folks! Thanks so much for reaching out about this. I have looped in our Support Engineers and we are looking into what could be happening here. Stay tuned to this thread for updates.

seeing the same thing with our nested directory publish directory “moped-editor/build”

Comparing build logs to the last one that worked, buildbot version has changed (but not the build image)
Working:

3:03:58 PM: Build ready to start
3:04:07 PM: build-image version: 2cee85eb7f808bf3b6e87378c5307f9411f0a332
3:04:07 PM: build-image tag: v3.8.0
3:04:07 PM: buildbot version: 15847c6d0a519ae9a2d43f2dc7c8e71dcd3aeff8

Recent failed:

9:40:25 PM: Build ready to start
9:40:27 PM: build-image version: 2cee85eb7f808bf3b6e87378c5307f9411f0a332
9:40:27 PM: build-image tag: v3.8.0
9:40:27 PM: buildbot version: fd2d744d8bfa914ebde93203088eebb12b66468e
1 Like

Thanks for that detail, @joewoodhouse! Could you please share your site name or URL?

happy-yalow-363c08

1 Like

Yep happening here too, at the end of the day aswell

We can relate to this

1 Like

Thanks for reaching out folks.

Would you mind trying the build again? We had enabled a feature flag related to the publish directory on our end but have now turned it off. I am hopeful your builds will work now - please let us know! I will keep my eyes on this thread for responses.

Failed again I’m afraid (deploy ID 60f09d39675b521b09bcb969 on my site)

1 Like

Unfortunately failed again for us. Deploy ID: 60f09fb640044900e3c57b69 on assured-staging-god-view.