Node script not running after next build completes

I am trying to create a _redirect file using data from our Sanity CMS after running next build. Here is what I’m running to build:

"build": "echo 'Building Sanity to public/studio…' && cd studio && npx sanity build ../public/studio -y && cd .. && next build && node ./public/build/generate-redirects.js"

The issue is that echo 'Building redirects...' && node ./public/build/generate-redirects.js never seems to run, therefor my _redirects file isn’t created after next build is complete. I added an echo to try to debug it, but I don’t see the echo in the build log.

Is there something I’m missing? I can generate a _redirect file locally and deploy with the static __redirects file included, but we need to be able to create this dynamically when documents are added in the CMS and the site is rebuilt remotely.

Site name: matteprojects.netlify.app

Build Log:

3:39:34 PM: build-image version: d55944c047ef0aee2ac01971edde72cb2a50acfe (focal)
3:39:34 PM: build-image tag: v4.16.1
3:39:34 PM: buildbot version: a1ec8307ac4591dcd155485cdfce7d7be735ab26
3:39:34 PM: Fetching cached dependencies
3:39:34 PM: Starting to download cache of 162.9MB
3:39:36 PM: Finished downloading cache in 1.825684982s
3:39:36 PM: Starting to extract cache
3:39:38 PM: Finished extracting cache in 1.294904048s
3:39:38 PM: Finished fetching cache in 3.169098138s
3:39:38 PM: Starting to prepare the repo for build
3:39:38 PM: Preparing Git Reference refs/heads/master
3:39:38 PM: Parsing package.json dependencies
3:39:40 PM: Starting build script
3:39:40 PM: Installing dependencies
3:39:40 PM: Python version set to 2.7
3:39:40 PM: Started restoring cached node version
3:39:40 PM: Finished restoring cached node version
3:39:41 PM: v16.19.0 is already installed.
3:39:41 PM: Now using node v16.19.0 (npm v8.19.3)
3:39:41 PM: Enabling node corepack
3:39:41 PM: Started restoring cached build plugins
3:39:41 PM: Finished restoring cached build plugins
3:39:41 PM: Attempting ruby version 2.7.2, read from environment
3:39:42 PM: Using ruby version 2.7.2
3:39:42 PM: Using PHP version 8.0
3:39:42 PM: No npm workspaces detected
3:39:42 PM: Started restoring cached node modules
3:39:42 PM: Finished restoring cached node modules
3:39:42 PM: Installing NPM modules using NPM version 8.19.3
3:39:43 PM: npm WARN EBADENGINE Unsupported engine {
3:39:43 PM: npm WARN EBADENGINE package: ‘hull@2.5.0’,
3:39:43 PM: npm WARN EBADENGINE required: { node: ‘14.x’ },
3:39:43 PM: npm WARN EBADENGINE current: { node: ‘v16.19.0’, npm: ‘8.19.3’ }
3:39:43 PM: npm WARN EBADENGINE }
3:39:45 PM: > hull@2.5.0 postinstall
3:39:45 PM: > cd studio && npm install
3:40:12 PM: npm WARN deprecated source-map-url@0.4.1: See GitHub - lydell/source-map-url: [DEPRECATED] Tools for working with sourceMappingURL comments.
3:40:12 PM: npm WARN deprecated source-map-resolve@0.5.3: See GitHub - lydell/source-map-resolve: [DEPRECATED] Resolve the source map and/or sources for a generated file.
3:40:12 PM: npm WARN deprecated querystring@0.2.0: The querystring API is considered Legacy. new code should use the URLSearchParams API instead.
3:40:13 PM: npm WARN deprecated acorn-dynamic-import@2.0.2: This is probably built in to whatever tool you’re using. If you still need it… idknpm WARN deprecated stable@0.1.8: Modern JS already guarantees Array#sort() is a stable sort, so this library is deprecated. See the compatibility table on MDN: Array.prototype.sort() - JavaScript | MDN
3:40:13 PM: npm WARN deprecated react-eyedrop@4.1.4: doesnt work
3:40:13 PM: npm WARN deprecated flatten@1.0.3: flatten is deprecated in favor of utility frameworks such as lodash.
3:40:14 PM: npm WARN deprecated extract-text-webpack-plugin@3.0.2: Deprecated. Please use GitHub - webpack-contrib/mini-css-extract-plugin: Lightweight CSS extraction plugin
3:40:14 PM: npm WARN deprecated postcss-cssnext@3.1.1: ‘postcss-cssnext’ has been deprecated in favor of ‘postcss-preset-env’. Read more at Deprecating cssnext
3:40:15 PM: npm WARN deprecated svgo@1.3.2: This SVGO version is no longer supported. Upgrade to v2.x.x.
3:40:16 PM: npm WARN deprecated request-promise-native@1.0.9: request-promise-native has been deprecated because it extends the now deprecated request package, see https://github.com/request/request/issues/3142
3:40:16 PM: npm WARN deprecated request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
3:40:17 PM: npm WARN deprecated har-validator@5.1.5: this library is no longer supported
3:40:17 PM: npm WARN deprecated eslint-plugin-standard@5.0.0: standard 16.0.0 and eslint-config-standard 16.0.0 no longer require the eslint-plugin-standard package. You can remove it from your dependencies with ‘npm rm eslint-plugin-standard’. More info here: https://github.com/standard/standard/issues/1316
3:40:17 PM: npm WARN deprecated messageformat@2.3.0: Package renamed as ‘@messageformat/core’, see messageformat.github.io for more details. ‘messageformat’ will eventually provide a polyfill for Intl.MessageFormat, once it’s been defined by Unicode & ECMA.npm WARN deprecated babel-eslint@10.1.0: babel-eslint is now @babel/eslint-parser. This package will no longer receive updates.
3:40:18 PM: npm WARN deprecated chokidar@2.1.8: Chokidar 2 does not receive security updates since 2019. Upgrade to chokidar 3 with 15x fewer dependencies
3:40:18 PM: npm WARN deprecated browserslist@2.11.3: Browserslist 2 could fail on reading Browserslist >3.0 config used in other tools.
3:40:18 PM: npm WARN deprecated browserslist@2.11.3: Browserslist 2 could fail on reading Browserslist >3.0 config used in other tools.
3:40:18 PM: npm WARN deprecated browserslist@2.11.3: Browserslist 2 could fail on reading Browserslist >3.0 config used in other tools.
3:40:19 PM: npm WARN deprecated uuid@3.4.0: Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See There’s Math.random(), and then there’s Math.random() · V8 for details.
3:40:20 PM: npm WARN deprecated uuid@3.4.0: Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See There’s Math.random(), and then there’s Math.random() · V8 for details.
3:40:20 PM: npm WARN deprecated urix@0.1.0: Please see GitHub - lydell/urix: [DEPRECATED] Makes Windows-style paths more unix and URI friendly.
3:40:20 PM: npm WARN deprecated resolve-url@0.2.1: GitHub - lydell/resolve-url: [DEPRECATED] Like Node.js’ `path.resolve`/`url.resolve` for the browser.
3:40:27 PM: npm WARN deprecated core-js@2.6.12: core-js@<3.23.3 is no longer maintained and not recommended for usage due to the number of issues. Because of the V8 engine whims, feature detection in old core-js versions could cause a slowdown up to 100x even if nothing is polyfilled. Some versions have web compatibility issues. Please, upgrade your dependencies to the actual version of core-js.
3:40:37 PM: added 2129 packages, and audited 2130 packages in 51s
3:40:37 PM: 138 packages are looking for funding
3:40:37 PM: run npm fund for details
3:40:37 PM: 79 vulnerabilities (49 moderate, 18 high, 12 critical)
3:40:37 PM: To address issues that do not require attention, run:
3:40:37 PM: npm audit fix
3:40:37 PM: To address all issues (including breaking changes), run:
3:40:37 PM: npm audit fix --force
3:40:37 PM: Run npm audit for details.
3:40:37 PM: up to date, audited 393 packages in 54s
3:40:37 PM: 37 packages are looking for funding
3:40:37 PM: run npm fund for details
3:40:37 PM: 8 vulnerabilities (1 low, 1 moderate, 3 high, 3 critical)
3:40:37 PM: To address all issues, run:
3:40:37 PM: npm audit fix
3:40:37 PM: Run npm audit for details.
3:40:37 PM: NPM modules installed
3:40:37 PM: Creating package sha
3:40:37 PM: Started restoring cached go cache
3:40:37 PM: Finished restoring cached go cache
3:40:37 PM: Installing Go version 1.17 (requested 1.17)
3:40:41 PM: unset GOOS;
3:40:41 PM: unset GOARCH;
3:40:41 PM: export GOROOT=‘/opt/buildhome/.gimme/versions/go1.17.linux.amd64’;
3:40:41 PM: export PATH=“/opt/buildhome/.gimme/versions/go1.17.linux.amd64/bin:${PATH}”;
3:40:41 PM: go version >&2;
3:40:41 PM: export GIMME_ENV=“/opt/buildhome/.gimme/env/go1.17.linux.amd64.env”
3:40:41 PM: go version go1.17 linux/amd64
3:40:42 PM: Detected 1 framework(s)
3:40:42 PM: “next” at version “12.2.3”
3:40:42 PM: Installing missing commands
3:40:42 PM: Verify run directory
3:40:42 PM: Section completed: initializing
3:40:43 PM: ​
3:40:43 PM: Netlify Build
3:40:43 PM: ────────────────────────────────────────────────────────────────
3:40:43 PM: ​
3:40:43 PM: ❯ Version
3:40:43 PM: @netlify/build 29.4.0
3:40:43 PM: ​
3:40:43 PM: ❯ Flags
3:40:43 PM: baseRelDir: true
3:40:43 PM: buildId: 63b5e4057479940008413889
3:40:43 PM: deployId: 63b5e405747994000841388b
3:40:43 PM: ​
3:40:43 PM: ❯ Current directory
3:40:43 PM: /opt/build/repo
3:40:43 PM: ​
3:40:43 PM: ❯ Config file
3:40:43 PM: No config file was defined: using default values.
3:40:43 PM: ​
3:40:43 PM: ❯ Context
3:40:43 PM: production
3:40:43 PM: ​
3:40:43 PM: ❯ Using Next.js Runtime - v4.29.4
3:40:44 PM: ​
3:40:44 PM: 1. @netlify/plugin-nextjs (onPreBuild event)
3:40:44 PM: ────────────────────────────────────────────────────────────────
3:40:44 PM: ​
3:40:44 PM: Next.js cache restored.
3:40:44 PM: Netlify configuration property “build.environment.NEXT_PRIVATE_TARGET” value changed.
3:40:44 PM: ​
3:40:44 PM: (@netlify/plugin-nextjs onPreBuild completed in 117ms)
3:40:44 PM: ​
3:40:44 PM: 2. Build command from Netlify app
3:40:44 PM: ────────────────────────────────────────────────────────────────
3:40:44 PM: ​
3:40:44 PM: $ next build
3:40:45 PM: info - Linting and checking validity of types…
3:40:45 PM: warn - No ESLint configuration detected. Run next lint to begin setup
3:40:49 PM: info - Creating an optimized production build…
3:41:00 PM: info - Compiled successfully
3:41:00 PM: info - Collecting page data…
3:41:02 PM: info - Generating static pages (0/320)
3:41:04 PM: Warning: data for page “/journal/work” is 210 kB which exceeds the threshold of 128 kB, this amount of data can reduce performance.
3:41:04 PM: See more info here: large-page-data | Next.js
3:41:04 PM: Warning: data for page “/journal” is 263 kB which exceeds the threshold of 128 kB, this amount of data can reduce performance.
3:41:04 PM: See more info here: large-page-data | Next.js
3:41:04 PM: Warning: data for page “/search” is 192 kB which exceeds the threshold of 128 kB, this amount of data can reduce performance.
3:41:04 PM: See more info here: large-page-data | Next.js
3:41:05 PM: info - Generating static pages (80/320)
3:41:08 PM: Warning: data for page “/capabilities/[slug]” is 168 kB which exceeds the threshold of 128 kB, this amount of data can reduce performance.
3:41:08 PM: See more info here: large-page-data | Next.js
3:41:08 PM: Warning: data for page “/capabilities/[slug]” is 139 kB which exceeds the threshold of 128 kB, this amount of data can reduce performance.
3:41:08 PM: See more info here: large-page-data | Next.js
3:41:08 PM: Warning: data for page “/capabilities/[slug]” is 168 kB which exceeds the threshold of 128 kB, this amount of data can reduce performance.
3:41:21 PM: info - Generating static pages (320/320)
3:41:21 PM: info - Finalizing page optimization…
3:41:21 PM: Page Size First Load JS
3:41:21 PM: ┌ ● / (1880 ms) 484 B 166 kB
3:41:21 PM: ├ /_app 0 B 131 kB
3:41:21 PM: ├ ● /[…slug] (597 ms) 690 B 166 kB
3:41:21 PM: ├ └ /terms-and-conditions (597 ms)
3:41:21 PM: ├ ○ /404 (1003 ms) 564 B 166 kB
3:41:21 PM: ├ ● /about (1091 ms) 1.4 kB 167 kB
3:41:21 PM: ├ λ /api/klaviyo/newsletter-join 0 B 131 kB
3:41:21 PM: ├ λ /api/mailchimp/newsletter-join 0 B 131 kB
3:41:21 PM: ├ λ /api/preview 0 B 131 kB
3:41:21 PM: ├ λ /api/sendgrid/send-message 0 B 131 kB
3:41:21 PM: ├ ● /capabilities/[slug] (322895 ms) 43.1 kB 208 kB
3:41:21 PM: ├ ├ /capabilities/puma (11507 ms)
3:41:21 PM: ├ ├ /capabilities/netflix-music (11298 ms)
3:41:21 PM: ├ ├ /capabilities/ugg-experiential (10914 ms)
3:41:21 PM: ├ ├ /capabilities/ibm (9397 ms)
3:41:21 PM: ├ ├ /capabilities/general (9334 ms)
3:41:21 PM: ├ ├ /capabilities/genesishouse (9191 ms)
3:41:21 PM: ├ ├ /capabilities/img (9043 ms)
3:41:21 PM: ├ └ [+53 more paths] (avg 4759 ms)
3:41:21 PM: ├ ● /clients (808 ms) 997 B 163 kB
3:41:21 PM: ├ ● /clients/[slug] (27692 ms) 3.31 kB 172 kB
3:41:21 PM: ├ ├ /clients/tom-ford (451 ms)
3:41:21 PM: ├ ├ /clients/google (424 ms)
3:41:21 PM: ├ ├ /clients/les-mills (421 ms)
3:41:21 PM: ├ ├ /clients/guerlain (397 ms)
3:41:21 PM: ├ ├ /clients/yves-saint-laurent-beaute (397 ms)
3:41:21 PM: ├ ├ /clients/alexander-wang (384 ms)
3:41:21 PM: ├ ├ /clients/w-south-beach (382 ms)
3:41:21 PM: ├ └ [+75 more paths] (avg 331 ms)
3:41:21 PM: ├ ● /contact (772 ms) 796 B 163 kB
3:41:21 PM: ├ ● /journal (1720 ms) 621 B 174 kB
3:41:21 PM: ├ ● /journal/editorial (1234 ms) 626 B 174 kB
3:41:21 PM: ├ ● /journal/editorial/[slug] (54915 ms) 3.34 kB 174 kB
3:41:21 PM: ├ ├ /journal/editorial/declared (2077 ms)
3:41:21 PM: ├ ├ /journal/editorial/hell-of-a-cruise (1968 ms)
3:41:21 PM: ├ ├ /journal/editorial/q-a-with-ivan-olita (1915 ms)
3:41:21 PM: ├ ├ /journal/editorial/the-inspo-dhia-grillac (1872 ms)
3:41:21 PM: ├ ├ /journal/editorial/an-ode-to-jean-luc-godard-and-the-french-new-wave-of-film-that-came-through-him-joliamour-dubose (1864 ms)
3:41:21 PM: ├ ├ /journal/editorial/november-shows (1828 ms)
3:41:21 PM: ├ ├ /journal/editorial/la-luna (1816 ms)
3:41:21 PM: ├ └ [+31 more paths] (avg 1341 ms)
3:41:21 PM: ├ ● /journal/work (1694 ms) 627 B 174 kB
3:41:21 PM: ├ ● /journal/work/[slug] (159089 ms) 3.31 kB 174 kB
3:41:21 PM: ├ ├ /journal/work/live-fashion (2540 ms)
3:41:21 PM: ├ ├ /journal/work/aku-miami-art-basel-2021 (1981 ms)
3:41:21 PM: ├ ├ /journal/work/burberry-x-ssense-imaginary-cities (1778 ms)
3:41:21 PM: ├ ├ /journal/work/the-macallan-art-basel-miami-beach (1715 ms)
3:41:21 PM: ├ ├ /journal/work/los-angeles-club-lacoste-fw22-launch-event (1677 ms)
3:41:21 PM: ├ ├ /journal/work/yeezy (1673 ms)
3:41:21 PM: ├ ├ /journal/work/vans-somewhere-else-entirely (1670 ms)
3:41:21 PM: ├ └ [+122 more paths] (avg 1197 ms)
3:41:21 PM: ├ λ /robots.txt 332 B 131 kB
3:41:21 PM: ├ ● /search (1745 ms) 8.32 kB 177 kB
3:41:21 PM: └ λ /sitemap.xml 335 B 131 kB
3:41:21 PM: + First Load JS shared by all 131 kB
3:41:21 PM: ├ chunks/framework-dfb4b001ca8efcfd.js 45.2 kB
3:41:21 PM: ├ chunks/main-4a6b13b2591463f6.js 30.8 kB
3:41:21 PM: ├ chunks/pages/_app-33aa430c52ba97da.js 52.7 kB
3:41:21 PM: ├ chunks/webpack-33d5e40f2940d1ea.js 2.22 kB
3:41:21 PM: └ css/c083fe09dc6a7266.css 16.6 kB
3:41:21 PM: ƒ Middleware 19.7 kB
3:41:21 PM: λ (Server) server-side renders at runtime (uses getInitialProps or getServerSideProps)
3:41:21 PM: ○ (Static) automatically rendered as static HTML (uses no initial props)
3:41:21 PM: ● (SSG) automatically generated as static HTML + JSON (uses getStaticProps)
3:41:21 PM: ​
3:41:21 PM: (build.command completed in 36.9s)
3:41:21 PM: ​
3:41:21 PM: 3. @netlify/plugin-nextjs (onBuild event)
3:41:21 PM: ────────────────────────────────────────────────────────────────
3:41:21 PM: ​
3:41:22 PM: Patching /opt/build/repo/node_modules/next/dist/server/base-server.js
3:41:22 PM: Done
3:41:22 PM: Patching /opt/build/repo/node_modules/next/dist/server/next-server.js
3:41:22 PM: Done
3:41:22 PM: Moving static page files to serve from CDN…
3:41:22 PM: Moved 636 files
3:41:22 PM: Using Netlify Edge Functions for image format detection. Set env var “NEXT_DISABLE_EDGE_IMAGES=true” to disable.
3:41:22 PM: :sparkles: Deploying middleware and functions to Netlify Edge Functions :sparkles:
3:41:22 PM: This feature is in beta. Please share your feedback here: Next.js on Netlify Edge Functions Beta discussion · Discussion #1319 · netlify/next-runtime · GitHub
3:41:22 PM: Netlify configuration property “redirects” value changed to [
3:41:22 PM: { from: ‘/next/static/', to: ‘/static/:splat’, status: 200 },
3:41:22 PM: {
3:41:22 PM: from: '/_next/image
’,
3:41:22 PM: query: { url: ‘:url’, w: ‘:width’, q: ‘:quality’ },
3:41:22 PM: to: '/ipx/w:width,q
:quality/:url’,
3:41:22 PM: status: 301
3:41:22 PM: },
3:41:22 PM: { from: ‘/_ipx/', to: ‘/.netlify/builders/_ipx’, status: 200 },
3:41:22 PM: { from: '/cache/
’, to: ‘/404.html’, status: 404, force: true },
3:41:22 PM: { from: ‘/server/', to: ‘/404.html’, status: 404, force: true },
3:41:22 PM: { from: '/serverless/
’, to: ‘/404.html’, status: 404, force: true },
3:41:22 PM: { from: ‘/trace’, to: ‘/404.html’, status: 404, force: true },
3:41:22 PM: { from: ‘/traces’, to: ‘/404.html’, status: 404, force: true },
3:41:22 PM: {
3:41:22 PM: from: ‘/routes-manifest.json’,
3:41:22 PM: to: ‘/404.html’,
3:41:22 PM: status: 404,
3:41:22 PM: force: true
3:41:22 PM: },
3:41:22 PM: {
3:41:22 PM: from: ‘/build-manifest.json’,
3:41:22 PM: to: ‘/404.html’,
3:41:22 PM: status: 404,
3:41:22 PM: force: true
3:41:22 PM: },
3:41:22 PM: {
3:41:22 PM: from: ‘/prerender-manifest.json’,
3:41:22 PM: to: ‘/404.html’,
3:41:22 PM: status: 404,
3:41:22 PM: force: true
3:41:22 PM: },
3:41:22 PM: {
3:41:22 PM: from: ‘/react-loadable-manifest.json’,
3:41:22 PM: to: ‘/404.html’,
3:41:22 PM: status: 404,
3:41:22 PM: force: true
3:41:22 PM: },
3:41:22 PM: { from: ‘/BUILD_ID’, to: ‘/404.html’, status: 404, force: true },
3:41:22 PM: {
3:41:22 PM: from: ‘/api/',
3:41:22 PM: to: ‘/.netlify/functions/___netlify-handler’,
3:41:22 PM: status: 200
3:41:22 PM: },
3:41:22 PM: {
3:41:22 PM: from: ‘/_redirects’,
3:41:22 PM: to: ‘/_redirects’,
3:41:22 PM: conditions: { Cookie: [Array] },
3:41:22 PM: status: 200
3:41:22 PM: },
3:41:22 PM: {
3:41:22 PM: from: ‘/build/generate-redirects.js’,
3:41:22 PM: to: ‘/build/generate-redirects.js’,
3:41:22 PM: conditions: { Cookie: [Array] },
3:41:22 PM: status: 200
3:41:22 PM: },
3:41:22 PM: {
3:41:22 PM: from: ‘/images/matte-bg.jpeg’,
3:41:22 PM: to: ‘/images/matte-bg.jpeg’,
3:41:22 PM: conditions: { Cookie: [Array] },
3:41:22 PM: status: 200
3:41:22 PM: },
3:41:22 PM: {
3:41:22 PM: from: ‘/fonts/Gotham-Book.woff’,
3:41:22 PM: to: ‘/fonts/Gotham-Book.woff’,
3:41:22 PM: conditions: { Cookie: [Array] },
3:41:22 PM: status: 200
3:41:22 PM: },
3:41:22 PM: {
3:41:22 PM: from: ‘/fonts/Gotham-Book.woff2’,
3:41:22 PM: to: ‘/fonts/Gotham-Book.woff2’,
3:41:22 PM: conditions: { Cookie: [Array] },
3:41:22 PM: status: 200
3:41:22 PM: },
3:41:22 PM: {
3:41:22 PM: from: ‘/fonts/Grtsk-Giga-Regular.woff’,
3:41:22 PM: to: ‘/fonts/Grtsk-Giga-Regular.woff’,
3:41:22 PM: conditions: { Cookie: [Array] },
3:41:22 PM: status: 200
3:41:22 PM: },
3:41:22 PM: {
3:41:22 PM: from: ‘/fonts/Grtsk-Giga-Regular.woff2’,
3:41:22 PM: to: ‘/fonts/Grtsk-Giga-Regular.woff2’,
3:41:22 PM: conditions: { Cookie: [Array] },
3:41:22 PM: status: 200
3:41:22 PM: },
3:41:22 PM: {
3:41:22 PM: from: ‘/fonts/Grtsk-Mega-Medium.woff’,
3:41:22 PM: to: ‘/fonts/Grtsk-Mega-Medium.woff’,
3:41:22 PM: conditions: { Cookie: [Array] },
3:41:22 PM: status: 200
3:41:22 PM: },
3:41:22 PM: {
3:41:22 PM: from: ‘/fonts/Grtsk-Mega-Medium.woff2’,
3:41:22 PM: to: ‘/fonts/Grtsk-Mega-Medium.woff2’,
3:41:22 PM: conditions: { Cookie: [Array] },
3:41:22 PM: status: 200
3:41:22 PM: },
3:41:22 PM: {
3:41:22 PM: from: ‘/fonts/Grtsk-Tera-Medium-Italic.woff’,
3:41:22 PM: to: ‘/fonts/Grtsk-Tera-Medium-Italic.woff’,
3:41:22 PM: conditions: { Cookie: [Array] },
3:41:22 PM: status: 200
3:41:22 PM: },
3:41:22 PM: {
3:41:22 PM: from: ‘/fonts/Grtsk-Tera-Medium-Italic.woff2’,
3:41:22 PM: to: ‘/fonts/Grtsk-Tera-Medium-Italic.woff2’,
3:41:22 PM: conditions: { Cookie: [Array] },
3:41:22 PM: status: 200
3:41:22 PM: },
3:41:22 PM: {
3:41:22 PM: from: ‘/fonts/Grtsk-Tera-Regular.woff’,
3:41:22 PM: to: ‘/fonts/Grtsk-Tera-Regular.woff’,
3:41:22 PM: conditions: { Cookie: [Array] },
3:41:22 PM: status: 200
3:41:22 PM: },
3:41:22 PM: {
3:41:22 PM: from: ‘/fonts/Grtsk-Tera-Regular.woff2’,
3:41:22 PM: to: ‘/fonts/Grtsk-Tera-Regular.woff2’,
3:41:22 PM: conditions: { Cookie: [Array] },
3:41:22 PM: status: 200
3:41:22 PM: },
3:41:22 PM: {
3:41:22 PM: from: ‘/models/matte-logo.dae’,
3:41:22 PM: to: ‘/models/matte-logo.dae’,
3:41:22 PM: conditions: { Cookie: [Array] },
3:41:22 PM: status: 200
3:41:22 PM: },
3:41:22 PM: {
3:41:22 PM: from: ‘/models/matte-logo.glb’,
3:41:22 PM: to: ‘/models/matte-logo.glb’,
3:41:22 PM: conditions: { Cookie: [Array] },
3:41:22 PM: status: 200
3:41:22 PM: },
3:41:22 PM: {
3:41:22 PM: from: ‘/models/matte-logo.gltf’,
3:41:22 PM: to: ‘/models/matte-logo.gltf’,
3:41:22 PM: conditions: { Cookie: [Array] },
3:41:22 PM: status: 200
3:41:22 PM: },
3:41:22 PM: {
3:41:22 PM: from: ‘/video/matte_globe.mp4’,
3:41:22 PM: to: ‘/video/matte_globe.mp4’,
3:41:22 PM: conditions: { Cookie: [Array] },
3:41:22 PM: status: 200
3:41:22 PM: },
3:41:22 PM: {
3:41:22 PM: from: '/
’,
3:41:22 PM: to: ‘/.netlify/functions/___netlify-handler’,
3:41:22 PM: status: 200,
3:41:22 PM: conditions: { Cookie: [Array] },
3:41:22 PM: force: true
3:41:22 PM: },
3:41:22 PM: {
3:41:22 PM: from: ‘/_next/data/0L_3089GHA3fn4aRX8K6G/robots.txt.json’,
3:41:22 PM: to: ‘/.netlify/functions/___netlify-handler’,
3:41:22 PM: status: 200,
3:41:22 PM: force: false
3:41:22 PM: },
3:41:22 PM: {
3:41:22 PM: from: ‘/robots.txt’,
3:41:22 PM: to: ‘/.netlify/functions/___netlify-handler’,
3:41:22 PM: status: 200,
3:41:22 PM: force: false
3:41:22 PM: },
3:41:22 PM: {
3:41:22 PM: from: ‘/_next/data/0L_3089GHA3fn4aRX8K6G/sitemap.xml.json’,
3:41:22 PM: to: ‘/.netlify/functions/___netlify-handler’,
3:41:22 PM: status: 200,
3:41:22 PM: force: false
3:41:22 PM: },
3:41:22 PM: {
3:41:22 PM: from: ‘/sitemap.xml’,
3:41:22 PM: to: ‘/.netlify/functions/___netlify-handler’,
3:41:22 PM: status: 200,
3:41:22 PM: force: false
3:41:22 PM: },
3:41:22 PM: {
3:41:22 PM: from: ‘/_next/data/0L_3089GHA3fn4aRX8K6G/capabilities/:slug.json’,
3:41:22 PM: to: ‘/server/pages/404.html’,
3:41:22 PM: status: 404,
3:41:22 PM: force: false
3:41:22 PM: },
3:41:22 PM: {
3:41:22 PM: from: ‘/capabilities/:slug’,
3:41:22 PM: to: ‘/server/pages/404.html’,
3:41:22 PM: status: 404,
3:41:22 PM: force: false
3:41:22 PM: },
3:41:22 PM: {
3:41:22 PM: from: ‘/_next/data/0L_3089GHA3fn4aRX8K6G/clients/:slug.json’,
3:41:22 PM: to: ‘/server/pages/404.html’,
3:41:22 PM: status: 404,
3:41:22 PM: force: false
3:41:22 PM: },
3:41:22 PM: {
3:41:22 PM: from: ‘/clients/:slug’,
3:41:22 PM: to: ‘/server/pages/404.html’,
3:41:22 PM: status: 404,
3:41:22 PM: force: false
3:41:22 PM: },
3:41:22 PM: {
3:41:22 PM: from: ‘/_next/data/0L_3089GHA3fn4aRX8K6G/journal/editorial/:slug.json’,
3:41:22 PM: to: ‘/server/pages/404.html’,
3:41:22 PM: status: 404,
3:41:22 PM: force: false
3:41:22 PM: },
3:41:22 PM: {
3:41:22 PM: from: ‘/journal/editorial/:slug’,
3:41:22 PM: to: ‘/server/pages/404.html’,
3:41:22 PM: status: 404,
3:41:22 PM: force: false
3:41:22 PM: },
3:41:22 PM: {
3:41:22 PM: from: ‘/_next/data/0L_3089GHA3fn4aRX8K6G/journal/work/:slug.json’,
3:41:22 PM: to: ‘/server/pages/404.html’,
3:41:22 PM: status: 404,
3:41:22 PM: force: false
3:41:22 PM: },
3:41:22 PM: {
3:41:22 PM: from: ‘/journal/work/:slug’,
3:41:22 PM: to: ‘/server/pages/404.html’,
3:41:22 PM: status: 404,
3:41:22 PM: force: false
3:41:22 PM: },
3:41:22 PM: {
3:41:22 PM: from: ‘/_next/data/0L_3089GHA3fn4aRX8K6G/:slug/',
3:41:22 PM: to: ‘/server/pages/404.html’,
3:41:22 PM: status: 404,
3:41:22 PM: force: false
3:41:22 PM: },
3:41:22 PM: {
3:41:22 PM: from: '/:slug/
’,
3:41:22 PM: to: ‘/server/pages/404.html’,
3:41:22 PM: status: 404,
3:41:22 PM: force: false
3:41:22 PM: },
3:41:22 PM: {
3:41:22 PM: from: ‘/*’,
3:41:22 PM: to: ‘/.netlify/functions/___netlify-handler’,
3:41:22 PM: status: 200
3:41:22 PM: }
3:41:22 PM: ].
3:41:22 PM: ​
3:41:22 PM: (@netlify/plugin-nextjs onBuild completed in 299ms)
3:41:22 PM: ​
3:41:22 PM: 4. Functions bundling
3:41:22 PM: ────────────────────────────────────────────────────────────────
3:41:22 PM: ​
3:41:22 PM: Packaging Functions from .netlify/functions-internal directory:
3:41:22 PM: - ___netlify-handler/___netlify-handler.js
3:41:22 PM: - ___netlify-odb-handler/___netlify-odb-handler.js
3:41:22 PM: - _ipx/_ipx.js
3:41:22 PM: ​
3:41:41 PM: ​
3:41:41 PM: (Functions bundling completed in 19.1s)
3:41:41 PM: ​
3:41:41 PM: 5. Edge Functions bundling
3:41:41 PM: ────────────────────────────────────────────────────────────────
3:41:41 PM: ​
3:41:41 PM: Packaging Edge Functions from .netlify/edge-functions directory:
3:41:41 PM: - ipx
3:41:41 PM: - next_middleware
3:41:44 PM: ​
3:41:44 PM: (Edge Functions bundling completed in 2.7s)
3:41:44 PM: ​
3:41:44 PM: 6. @netlify/plugin-nextjs (onPostBuild event)
3:41:44 PM: ────────────────────────────────────────────────────────────────
3:41:44 PM: ​
3:41:44 PM: Next.js cache saved.
3:41:44 PM: ​
3:41:44 PM: (@netlify/plugin-nextjs onPostBuild completed in 167ms)
3:41:44 PM: ​
3:41:44 PM: 7. Deploy site
3:41:44 PM: ────────────────────────────────────────────────────────────────
3:41:44 PM: ​
3:41:44 PM: Starting to deploy site from ‘.next’
3:41:44 PM: Creating deploy tree asynchronously
3:41:46 PM: 360 new files to upload
3:41:46 PM: 2 new functions to upload
3:41:47 PM: 0% complete
3:41:47 PM: 5% complete
3:41:47 PM: 10% complete
3:41:47 PM: 15% complete
3:41:48 PM: 20% complete
3:41:48 PM: 25% complete
3:41:48 PM: 30% complete
3:41:48 PM: 35% complete
3:41:48 PM: 40% complete
3:41:48 PM: 45% complete
3:41:48 PM: 50% complete
3:41:48 PM: 55% complete
3:41:49 PM: 60% complete
3:41:49 PM: 65% complete
3:41:49 PM: 70% complete
3:41:49 PM: 75% complete
3:41:49 PM: 80% complete
3:41:49 PM: 85% complete
3:41:49 PM: 90% complete
3:41:50 PM: 95% complete
3:41:50 PM: 100% complete
3:41:57 PM: Section completed: deploying
3:41:57 PM: Site deploy was successfully initiated
3:41:57 PM: ​
3:41:57 PM: (Deploy site completed in 13.5s)
3:41:57 PM: ​
3:41:57 PM: Netlify Build Complete
3:41:57 PM: ────────────────────────────────────────────────────────────────
3:41:57 PM: ​
3:41:57 PM: (Netlify Build completed in 1m 14.5s)
3:41:58 PM: Caching artifacts
3:41:58 PM: Started saving node modules
3:41:58 PM: Finished saving node modules
3:41:58 PM: Starting post processing
3:41:58 PM: Started saving build plugins
3:41:58 PM: Finished saving build plugins
3:41:58 PM: Started saving pip cache
3:41:58 PM: Finished saving pip cache
3:41:58 PM: Post processing - HTML
3:41:58 PM: Started saving emacs cask dependencies
3:41:58 PM: Finished saving emacs cask dependencies
3:41:58 PM: Started saving maven dependencies
3:41:58 PM: Finished saving maven dependencies
3:41:58 PM: Started saving boot dependencies
3:41:58 PM: Finished saving boot dependencies
3:41:58 PM: Started saving rust rustup cache
3:41:58 PM: Finished saving rust rustup cache
3:41:58 PM: Started saving go dependencies
3:41:58 PM: Finished saving go dependencies
3:41:58 PM: Build script success
3:41:58 PM: Section completed: building
3:42:01 PM: Uploading Cache of size 163.2MB
3:42:02 PM: Section completed: cleanup
3:42:02 PM: Finished processing build request in 2m27.944571207s
3:42:15 PM: Post processing - header rules
3:42:15 PM: Post processing - redirect rules
3:42:16 PM: Post processing done
3:42:16 PM: Section completed: postprocessing
3:42:20 PM: Site is live :sparkles:

The better the post - the faster the answer.

Hi @jakepfahl :wave:t6: did you try upgrading first? If not do that and have a look through this resource 7? It is a compilation of all of our build and deploy resources. This is a good starting point.

If those resources don’t get you on the right track, can you share a bit more information about what you are trying to accomplish?

Lastly, please share these additional details so we can look into your experience further:

  • the name of your build instance: “example-jones.netlify.com 1
  • your project repo
  • what you have already tried
  • any error messages you have received in your terminal window or in the developer console

Thanks so much!

hey @SamO it looks like the uuid warning is during the sanity build, and doesn’t conflict with the subsequent next build. Since the redirects script is supposed to run after next build, and next build completes successfully, these shouldn’t be connect right?

  • netlify build instance: matteprojects.netlify.app
  • github repo is private since this is a client site
  • I was originally using next.config.js redirects with to create the redirects from sanity which was working until today. Building the _redirect file locally works, but adding it to the package.json file does not.
  • I’m not receiving any error messages which is making it difficult to debug

Is there a trick to building a new _redirect file from a generate-redirects.js file at build time by using a node script?

Your build command is next build which is only calling the next binary to build. You should change it to npm run build.

Thanks @hrishikesh! That fixed it.

Hi @jakepfahl, thanks for coming back and letting us know this helped fix your issue. We appreciate the feedback and for marking this as the solution.