Remote image urls are not working

Hello.
I am using Astro, with an image component Asto-ImageTools (limited new user linking), with Contentful. Both my local dev and build environments work perfectly, but I get this build error on Netlify:

11:57:47 AM:  error   fileTypeFromBuffer is not a function
11:57:47 AM:     at getProcessedImage (614:30)
11:57:47 AM:     at processTicksAndRejections (node:internal/process/task_queues:96:5)
11:57:47 AM:     at async getImage (limited new user linking)
11:57:47 AM:     at async renderImg (limited new user linking)
11:57:47 AM:     at async (limited new user linking)
11:57:47 AM:     at async renderToIterable (limited new user linking)
11:57:47 AM:     at async renderAstroComponentInline (limited new user linking)
11:57:47 AM:     at async renderChild (limited new user linking)
11:57:47 AM:     at async AstroComponent.[Symbol.asyncIterator] (limited new user linking)
11:57:47 AM:     at async renderAstroComponent (limited new user linking)

Entire build log below.

Things that I have tried:

  • Patched a known issue with astro-imagetools (the image component); (limited new user linking)
  • created a reproduction but with no success. My reproduction works perfectly with the EXACT same code and dependencies.
  • verified access keys and environment variables in netlify
  • verified that the url passed into the image beings with ‘https;’ since contentful gives the rest.
  • Allowing all Access-Control-Allow-Origin in netlify.toml

So far, I’ve narrowed down the problematic instance through trial and error to using the image component with a url pointing to Contentful (https:////images.ctfassets.net/<…>.jpg).

My netlify.toml:

[build]
  command = "yarn run build"
  publish = "dist"
[[headers]]
  for = "*"
  [headers.values]
    Access-Control-Allow-Origin = "*"
[[redirects]]
  < etc >

Is netlify not allowing the url? if so how do I fix that besides my cors ? I’ve run out of ideas to diganose.

My site is https://review-mate.netlify.app/ but my current diagnosing attempts are on a branch imageissuefork: (limited new user linking)

I made a reproduction of the problematic code:
https://shiny-banoffee-a7a921.netlify.app/
The reproduction shows that the exact same code works successfully. All other instances of my image component except the example copied into my reproduction have been commented out.

Here is the entire failed build log (new user linking limitations):

12:26:11 PM: Build ready to start
12:26:16 PM: build-image version: d7b3dbfb0846505993c9a131894d1858074c90b4 (focal)
12:26:16 PM: build-image tag: v4.10.1
12:26:16 PM: buildbot version: 67e75f1ba713a8213d4b5a8ccf9708af751e2390
12:26:16 PM: Fetching cached dependencies
12:26:16 PM: Starting to download cache of 906.0MB
12:26:26 PM: Finished downloading cache in 9.947800418s
12:26:26 PM: Starting to extract cache
12:26:30 PM: Finished extracting cache in 4.145596055s
12:26:30 PM: Finished fetching cache in 14.225678356s
12:26:30 PM: Starting to prepare the repo for build
12:26:30 PM: Preparing Git Reference refs/heads/imageissuefork
12:26:32 PM: Parsing package.json dependencies
12:26:33 PM: Starting build script
12:26:33 PM: Installing dependencies
12:26:33 PM: Python version set to 2.7
12:26:33 PM: Started restoring cached node version
12:26:34 PM: Finished restoring cached node version
12:26:34 PM: v16.17.0 is already installed.
12:26:34 PM: Now using node v16.17.0 (npm v8.15.0)
12:26:34 PM: Started restoring cached build plugins
12:26:34 PM: Finished restoring cached build plugins
12:26:34 PM: Attempting ruby version 2.7.2, read from environment
12:26:35 PM: Using ruby version 2.7.2
12:26:35 PM: Using PHP version 8.0
12:26:35 PM: Started restoring cached yarn cache
12:26:38 PM: Finished restoring cached yarn cache
12:26:39 PM: No yarn workspaces detected
12:26:39 PM: Started restoring cached node modules
12:26:39 PM: Finished restoring cached node modules
12:26:39 PM: Installing NPM modules using Yarn version 1.22.10
12:26:39 PM: npm WARN config tmp This setting is no longer used.  npm stores temporary files in a special
12:26:39 PM: npm WARN config location in the cache, and they are managed by
12:26:39 PM: npm WARN config     [`cacache`](http://npm.im/cacache).
12:26:39 PM: yarn install v1.22.10
12:26:39 PM: warning package-lock.json found. Your project contains lock files generated by tools other than Yarn. It is advised not to mix package managers in order to avoid resolution inconsistencies caused by unsynchronized lock files. To clear this warning, remove package-lock.json.
12:26:39 PM: [1/4] Resolving packages...
12:26:40 PM: [2/4] Fetching packages...
12:26:40 PM: info esbuild-darwin-64@0.14.54: The platform "linux" is incompatible with this module.
12:26:40 PM: info "esbuild-darwin-64@0.14.54" is an optional dependency and failed compatibility check. Excluding it from installation.
12:26:40 PM: info fsevents@2.3.2: The platform "linux" is incompatible with this module.
12:26:40 PM: info "fsevents@2.3.2" is an optional dependency and failed compatibility check. Excluding it from installation.
12:26:40 PM: info esbuild-freebsd-arm64@0.14.54: The platform "linux" is incompatible with this module.
12:26:40 PM: info "esbuild-freebsd-arm64@0.14.54" is an optional dependency and failed compatibility check. Excluding it from installation.
12:26:40 PM: info esbuild-freebsd-arm64@0.14.54: The CPU architecture "x64" is incompatible with this module.
12:26:40 PM: info esbuild-linux-32@0.14.54: The CPU architecture "x64" is incompatible with this module.
12:26:40 PM: info "esbuild-linux-32@0.14.54" is an optional dependency and failed compatibility check. Excluding it from installation.
12:26:40 PM: info esbuild-android-64@0.14.54: The platform "linux" is incompatible with this module.
12:26:40 PM: info "esbuild-android-64@0.14.54" is an optional dependency and failed compatibility check. Excluding it from installation.
12:26:40 PM: info @esbuild/linux-loong64@0.14.54: The CPU architecture "x64" is incompatible with this module.
12:26:40 PM: info "@esbuild/linux-loong64@0.14.54" is an optional dependency and failed compatibility check. Excluding it from installation.
12:26:40 PM: info esbuild-android-arm64@0.14.54: The platform "linux" is incompatible with this module.
12:26:40 PM: info "esbuild-android-arm64@0.14.54" is an optional dependency and failed compatibility check. Excluding it from installation.
12:26:40 PM: info esbuild-android-arm64@0.14.54: The CPU architecture "x64" is incompatible with this module.
12:26:40 PM: info esbuild-freebsd-64@0.14.54: The platform "linux" is incompatible with this module.
12:26:40 PM: info "esbuild-freebsd-64@0.14.54" is an optional dependency and failed compatibility check. Excluding it from installation.
12:26:40 PM: info esbuild-linux-arm@0.14.54: The CPU architecture "x64" is incompatible with this module.
12:26:40 PM: info "esbuild-linux-arm@0.14.54" is an optional dependency and failed compatibility check. Excluding it from installation.
12:26:40 PM: info esbuild-darwin-arm64@0.14.54: The platform "linux" is incompatible with this module.
12:26:40 PM: info "esbuild-darwin-arm64@0.14.54" is an optional dependency and failed compatibility check. Excluding it from installation.
12:26:40 PM: info esbuild-darwin-arm64@0.14.54: The CPU architecture "x64" is incompatible with this module.
12:26:40 PM: info esbuild-linux-s390x@0.14.54: The CPU architecture "x64" is incompatible with this module.
12:26:40 PM: info "esbuild-linux-s390x@0.14.54" is an optional dependency and failed compatibility check. Excluding it from installation.
12:26:40 PM: info esbuild-linux-arm64@0.14.54: The CPU architecture "x64" is incompatible with this module.
12:26:40 PM: info "esbuild-linux-arm64@0.14.54" is an optional dependency and failed compatibility check. Excluding it from installation.
12:26:40 PM: info esbuild-linux-riscv64@0.14.54: The CPU architecture "x64" is incompatible with this module.
12:26:40 PM: info "esbuild-linux-riscv64@0.14.54" is an optional dependency and failed compatibility check. Excluding it from installation.
12:26:40 PM: info esbuild-netbsd-64@0.14.54: The platform "linux" is incompatible with this module.
12:26:40 PM: info "esbuild-netbsd-64@0.14.54" is an optional dependency and failed compatibility check. Excluding it from installation.
12:26:40 PM: info esbuild-linux-mips64le@0.14.54: The CPU architecture "x64" is incompatible with this module.
12:26:40 PM: info "esbuild-linux-mips64le@0.14.54" is an optional dependency and failed compatibility check. Excluding it from installation.
12:26:40 PM: info esbuild-openbsd-64@0.14.54: The platform "linux" is incompatible with this module.
12:26:40 PM: info "esbuild-openbsd-64@0.14.54" is an optional dependency and failed compatibility check. Excluding it from installation.
12:26:40 PM: info esbuild-windows-32@0.14.54: The platform "linux" is incompatible with this module.
12:26:40 PM: info "esbuild-windows-32@0.14.54" is an optional dependency and failed compatibility check. Excluding it from installation.
12:26:40 PM: info esbuild-windows-32@0.14.54: The CPU architecture "x64" is incompatible with this module.
12:26:40 PM: info esbuild-windows-64@0.14.54: The platform "linux" is incompatible with this module.
12:26:40 PM: info "esbuild-windows-64@0.14.54" is an optional dependency and failed compatibility check. Excluding it from installation.
12:26:40 PM: info esbuild-windows-arm64@0.14.54: The platform "linux" is incompatible with this module.
12:26:40 PM: info "esbuild-windows-arm64@0.14.54" is an optional dependency and failed compatibility check. Excluding it from installation.
12:26:40 PM: info esbuild-windows-arm64@0.14.54: The CPU architecture "x64" is incompatible with this module.
12:26:40 PM: info esbuild-linux-ppc64le@0.14.54: The CPU architecture "x64" is incompatible with this module.
12:26:40 PM: info "esbuild-linux-ppc64le@0.14.54" is an optional dependency and failed compatibility check. Excluding it from installation.
12:26:40 PM: info esbuild-sunos-64@0.14.54: The platform "linux" is incompatible with this module.
12:26:40 PM: info "esbuild-sunos-64@0.14.54" is an optional dependency and failed compatibility check. Excluding it from installation.
12:26:40 PM: [3/4] Linking dependencies...
12:26:40 PM: warning " > quicklink@2.3.0" has unmet peer dependency "react@^16.8.0".
12:26:40 PM: warning " > quicklink@2.3.0" has unmet peer dependency "react-dom@^16.8.0".
12:26:40 PM: warning " > vite-plugin-vsharp@1.1.5" has unmet peer dependency "vite@>2.0.0-0".
12:26:40 PM: warning "@astrojs/solid-js > babel-preset-solid@1.4.8" has unmet peer dependency "@babel/core@^7.0.0".
12:26:40 PM: warning "@astrojs/solid-js > babel-preset-solid > babel-plugin-jsx-dom-expressions@0.33.14" has unmet peer dependency "@babel/core@^7.0.0".
12:26:40 PM: warning " > vite-plugin-compress@2.1.1" has unmet peer dependency "vite@>2.0.0-0".
12:26:41 PM: [4/4] Building fresh packages...
12:26:41 PM: success Saved lockfile.
12:26:41 PM: $ patch-package
12:26:41 PM: patch-package 6.4.7
12:26:41 PM: Applying patches...
12:26:41 PM: astro-imagetools@0.6.10 ✔
12:26:41 PM: Done in 2.21s.
12:26:41 PM: NPM modules installed using Yarn
12:26:42 PM: Started restoring cached go cache
12:26:42 PM: Finished restoring cached go cache
12:26:42 PM: Installing Go version 1.16.5 (requested 1.16.5)
12:26:46 PM: unset GOOS;
12:26:46 PM: unset GOARCH;
12:26:46 PM: export GOROOT='/opt/buildhome/.gimme/versions/go1.16.5.linux.amd64';
12:26:46 PM: export PATH="/opt/buildhome/.gimme/versions/go1.16.5.linux.amd64/bin:${PATH}";
12:26:46 PM: go version >&2;
12:26:46 PM: export GIMME_ENV="/opt/buildhome/.gimme/env/go1.16.5.linux.amd64.env"
12:26:46 PM: go version go1.16.5 linux/amd64
12:26:46 PM: Installing missing commands
12:26:46 PM: Verify run directory
12:26:47 PM: ​
12:26:47 PM: ────────────────────────────────────────────────────────────────
12:26:47 PM:   Netlify Build                                                 
12:26:47 PM: ────────────────────────────────────────────────────────────────
12:26:47 PM: ​
12:26:47 PM: ❯ Version
12:26:47 PM:   @netlify/build 27.16.1
12:26:47 PM: ​
12:26:47 PM: ❯ Flags
12:26:47 PM:   baseRelDir: true
12:26:47 PM:   buildId: 630fb5d33bfbcf0008b4e754
12:26:47 PM:   deployId: 630fb5d33bfbcf0008b4e756
12:26:47 PM: ​
12:26:47 PM: ❯ Current directory
12:26:47 PM:   /opt/build/repo
12:26:47 PM: ​
12:26:47 PM: ❯ Config file
12:26:47 PM:   /opt/build/repo/netlify.toml
12:26:47 PM: ​
12:26:47 PM: ❯ Context
12:26:47 PM:   branch-deploy
12:26:47 PM: ​
12:26:47 PM: ────────────────────────────────────────────────────────────────
12:26:47 PM:   1. build.command from netlify.toml                            
12:26:47 PM: ────────────────────────────────────────────────────────────────
12:26:47 PM: ​
12:26:47 PM: $ yarn run build
12:26:47 PM: yarn run v1.22.10
12:26:47 PM: $ NODE_ENV=production astro build
12:26:49 PM: 07:26:49 PM [build] output target: static
12:26:49 PM: 07:26:49 PM [build] Collecting build info...
12:26:49 PM: 07:26:49 PM [build] Completed in 19ms.
12:26:49 PM: 07:26:49 PM [build] Building static entrypoints...
12:26:52 PM: 07:26:52 PM [build] Completed in 3.33s.
12:26:52 PM: 
12:26:52 PM:  building client 
12:26:52 PM: vite v3.0.5 building for production...
12:26:52 PM: transforming...
12:26:53 PM: ✓ 146 modules transformed.
12:26:53 PM: rendering chunks...
12:26:53 PM: dist/CommonTraits.815777a7.js                                         2.65 KiB / gzip: 1.41 KiB
12:26:53 PM: dist/FeatureDropdown.4e63d1d0.js                                      1.32 KiB / gzip: 0.72 KiB
12:26:53 PM: dist/FAQ.8a81e1ee.js                                                  1.06 KiB / gzip: 0.62 KiB
12:26:53 PM: dist/client.debead36.js                                               0.58 KiB / gzip: 0.41 KiB
12:26:53 PM: dist/hoisted.ac4df3de.js                                              1.96 KiB / gzip: 0.82 KiB
12:26:53 PM: dist/hoisted.73ce5aea.js                                              0.15 KiB / gzip: 0.13 KiB
12:26:53 PM: dist/chunks/FAQ.module.49a66bc1.js                                    0.96 KiB / gzip: 0.47 KiB
12:26:53 PM: dist/chunks/index.8bbc30b7.js                                         0.18 KiB / gzip: 0.17 KiB
12:26:53 PM: dist/chunks/page.b257bdc2.js                                          0.16 KiB / gzip: 0.15 KiB
12:26:53 PM: dist/chunks/web.8cd791b4.js                                           9.88 KiB / gzip: 3.96 KiB
12:26:53 PM: dist/chunks/Rellax.astro_astro_type_script_index_0_lang.4b00b34b.js   0.88 KiB / gzip: 0.58 KiB
12:26:53 PM: dist/assets/FAQ.18c53202.css                                          5.74 KiB / gzip: 1.80 KiB
12:26:53 PM: dist/ContactForm.895ff02d.js                                          136.73 KiB / gzip: 33.12 KiB
12:26:53 PM: Completed in 0.93s.
12:26:53 PM: 
12:26:53 PM: 
12:26:53 PM:  generating static routes 
12:26:53 PM: ▶ src/pages/index.astro
12:26:53 PM: WARNING(astro-seo): You passed the same value to `title` and `openGraph.optional.title`. This is most likely not what you want. See docs for more.
12:26:53 PM:   └─ /index.html (+24ms)
12:26:53 PM: ▶ src/pages/releasenotes/index.astro
12:26:53 PM:   └─ /releasenotes/index.html (+1ms)
12:26:53 PM: ▶ src/pages/releasenotes/[slug].astro
12:26:53 PM: WARNING(astro-seo): You passed the same value to `title` and `openGraph.optional.title`. This is most likely not what you want. See docs for more.
12:26:53 PM:   ├─ /releasenotes/release-notes:-7.0/index.html (+105ms)
12:26:53 PM: WARNING(astro-seo): You passed the same value to `title` and `openGraph.optional.title`. This is most likely not what you want. See docs for more.
12:26:53 PM:   └─ /releasenotes/release-notes:-6.1/index.html (+109ms)
12:26:53 PM: ▶ src/pages/keyfeatures.astro
12:26:53 PM: WARNING(astro-seo): You passed the same value to `title` and `openGraph.optional.title`. This is most likely not what you want. See docs for more.
12:26:53 PM:   └─ /keyfeatures/index.html (+7ms)
12:26:53 PM: ▶ src/pages/automation.astro
12:26:53 PM: WARNING(astro-seo): You passed the same value to `title` and `openGraph.optional.title`. This is most likely not what you want. See docs for more.
12:26:53 PM:   └─ /automation/index.html (+6ms)
12:26:53 PM: ▶ src/pages/monitoring/index.astro
12:26:53 PM: WARNING(astro-seo): You passed the same value to `title` and `openGraph.optional.title`. This is most likely not what you want. See docs for more.
12:26:53 PM:   └─ /monitoring/index.html (+5ms)
12:26:53 PM: ▶ src/pages/monitoring/[id].astro
12:26:53 PM: WARNING(astro-seo): You passed the same value to `title` and `openGraph.optional.title`. This is most likely not what you want. See docs for more.
12:26:53 PM: Responsive Image sets generated for Img at /photos/krukov.jpg in 26.286935000680387ms
12:26:53 PM:   ├─ /monitoring/staffing-analytics/index.html (+32ms)
12:26:53 PM: WARNING(astro-seo): You passed the same value to `title` and `openGraph.optional.title`. This is most likely not what you want. See docs for more.
12:26:53 PM: Responsive Image sets generated for Img at /photos/postitnotes.jpg in 5.635360999964178ms
12:26:53 PM:   ├─ /monitoring/customizable-tasks/index.html (+41ms)
12:26:53 PM: WARNING(astro-seo): You passed the same value to `title` and `openGraph.optional.title`. This is most likely not what you want. See docs for more.
12:26:53 PM: Responsive Image sets generated for Img at /photos/andrey.jpg in 5.403239999897778ms
12:26:53 PM:   ├─ /monitoring/audit-the-auditor/index.html (+50ms)
12:26:53 PM: WARNING(astro-seo): You passed the same value to `title` and `openGraph.optional.title`. This is most likely not what you want. See docs for more.
12:26:53 PM: Responsive Image sets generated for Img at /photos/goodluz.jpg in 6.057901999913156ms
12:26:53 PM:   ├─ /monitoring/education-tracking/index.html (+59ms)
12:26:53 PM: WARNING(astro-seo): You passed the same value to `title` and `openGraph.optional.title`. This is most likely not what you want. See docs for more.
12:26:53 PM: Responsive Image sets generated for Img at /photos/groupidea.jpg in 4.762469000183046ms
12:26:53 PM:   ├─ /monitoring/reviewmate-insights/index.html (+67ms)
12:26:53 PM: WARNING(astro-seo): You passed the same value to `title` and `openGraph.optional.title`. This is most likely not what you want. See docs for more.
12:26:53 PM: Responsive Image sets generated for Img at /photos/riskaversion.jpg in 5.152419999241829ms
12:26:53 PM:   └─ /monitoring/risk-manager/index.html (+75ms)
12:26:53 PM: ▶ src/pages/reporting/index.astro
12:26:53 PM: WARNING(astro-seo): You passed the same value to `title` and `openGraph.optional.title`. This is most likely not what you want. See docs for more.
12:26:53 PM:   └─ /reporting/index.html (+6ms)
12:26:53 PM: ▶ src/pages/reporting/[id].astro
12:26:53 PM: WARNING(astro-seo): You passed the same value to `title` and `openGraph.optional.title`. This is most likely not what you want. See docs for more.
12:26:53 PM: Responsive Image sets generated for Img at /photos/lukas.jpg in 3.9575819997116923ms
12:26:53 PM:   ├─ /reporting/accuracy-manager/index.html (+8ms)
12:26:53 PM: WARNING(astro-seo): You passed the same value to `title` and `openGraph.optional.title`. This is most likely not what you want. See docs for more.
12:26:53 PM: Responsive Image sets generated for Img at /photos/tima.jpg in 4.405499000102282ms
12:26:53 PM:   ├─ /reporting/code-finder/index.html (+16ms)
12:26:53 PM: WARNING(astro-seo): You passed the same value to `title` and `openGraph.optional.title`. This is most likely not what you want. See docs for more.
12:26:53 PM: Responsive Image sets generated for Img at /photos/cottonbro.jpg in 4.385152000002563ms
12:26:53 PM:   ├─ /reporting/dashboards/index.html (+25ms)
12:26:53 PM: WARNING(astro-seo): You passed the same value to `title` and `openGraph.optional.title`. This is most likely not what you want. See docs for more.
12:26:53 PM: Responsive Image sets generated for Img at /photos/artem.jpg in 4.313567999750376ms
12:26:53 PM:   ├─ /reporting/summary-templates/index.html (+32ms)
12:26:53 PM: WARNING(astro-seo): You passed the same value to `title` and `openGraph.optional.title`. This is most likely not what you want. See docs for more.
12:26:53 PM: Responsive Image sets generated for Img at /photos/kindel.jpg in 4.22807199973613ms
12:26:53 PM:   ├─ /reporting/coder-report-cards/index.html (+39ms)
12:26:53 PM: WARNING(astro-seo): You passed the same value to `title` and `openGraph.optional.title`. This is most likely not what you want. See docs for more.
12:26:53 PM: Responsive Image sets generated for Img at /photos/pixabay.jpg in 4.148155000060797ms
12:26:53 PM:   ├─ /reporting/exportability/index.html (+45ms)
12:26:53 PM: WARNING(astro-seo): You passed the same value to `title` and `openGraph.optional.title`. This is most likely not what you want. See docs for more.
12:26:53 PM: Responsive Image sets generated for Img at /photos/documentmanager.jpg in 5.5287319999188185ms
12:26:53 PM:   ├─ /reporting/document-manager/index.html (+102ms)
12:26:53 PM: WARNING(astro-seo): You passed the same value to `title` and `openGraph.optional.title`. This is most likely not what you want. See docs for more.
12:26:53 PM: Responsive Image sets generated for Img at /photos/CDIcommunication.jpg in 4.57805799972266ms
12:26:53 PM:   └─ /reporting/cdi-communication/index.html (+109ms)
12:26:53 PM: ▶ src/pages/resources.astro
12:26:53 PM: WARNING(astro-seo): You passed the same value to `title` and `openGraph.optional.title`. This is most likely not what you want. See docs for more.
12:26:53 PM: //images.ctfassets.net/xujv9wjjr6cj/56uYURBxui21ZLgErpgL9Q/fa5915820296d80fc49a7a53f2748a18/OfficialCodingGuidelines.jpg
12:26:53 PM: //images.ctfassets.net/xujv9wjjr6cj/3ulcubRivIOStClks94cNb/871a57f9089d798b7c86993856160a86/82f87882866fcce76dca31189f8b0135.jpeg
12:26:54 PM:  error   fileTypeFromBuffer is not a function
12:26:54 PM:     at getProcessedImage (file:///opt/build/repo/dist/entry.mjs?time=1661974013309:3614:30)
12:26:54 PM:     at processTicksAndRejections (node:internal/process/task_queues:96:5)
12:26:54 PM:     at async getImage (file:///opt/build/repo/dist/entry.mjs?time=1661974013309:3805:5)
12:26:54 PM:     at async renderImg (file:///opt/build/repo/dist/entry.mjs?time=1661974013309:4307:28)
12:26:54 PM:     at async file:///opt/build/repo/dist/entry.mjs?time=1661974013309:4373:32
12:26:54 PM:     at async renderToIterable (file:///opt/build/repo/dist/entry.mjs?time=1661974013309:623:21)
12:26:54 PM:     at async renderAstroComponentInline (file:///opt/build/repo/dist/entry.mjs?time=1661974013309:895:24)
12:26:54 PM:     at async renderChild (file:///opt/build/repo/dist/entry.mjs?time=1661974013309:652:5)
12:26:54 PM:     at async AstroComponent.[Symbol.asyncIterator] (file:///opt/build/repo/dist/entry.mjs?time=1661974013309:584:7)
12:26:54 PM:     at async renderAstroComponent (file:///opt/build/repo/dist/entry.mjs?time=1661974013309:592:20)
12:26:54 PM: error Command failed with exit code 1. (https://ntl.fyi/exit-code-1)
12:26:54 PM: info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
12:26:54 PM: ​
12:26:54 PM: ────────────────────────────────────────────────────────────────
12:26:54 PM:   "build.command" failed                                        
12:26:54 PM: ────────────────────────────────────────────────────────────────
12:26:54 PM: ​
12:26:54 PM:   Error message
12:26:54 PM:   Command failed with exit code 1: yarn run build (https://ntl.fyi/exit-code-1)
12:26:54 PM: ​
12:26:54 PM:   Error location
12:26:54 PM:   In build.command from netlify.toml:
12:26:54 PM:   yarn run build
12:26:54 PM: ​
12:26:54 PM:   Resolved config
12:26:54 PM:   build:
12:26:54 PM:     command: yarn run build
12:26:54 PM:     commandOrigin: config
12:26:54 PM:     environment:
12:26:54 PM:       - CONTENTFUL_CONTENT_DELIVERY
12:26:54 PM:       - CONTENTFUL_PREVIEW
12:26:54 PM:       - CONTENTFUL_SPACE_ID
12:26:54 PM:       - NETLIFY_GRAPH_TOKEN
12:26:54 PM:       - ONEGRAPH_AUTHLIFY_TOKEN
12:26:54 PM:     publish: /opt/build/repo/dist
12:26:54 PM:     publishOrigin: config
12:26:54 PM:   headers:
12:26:54 PM:     - for: '*'
12:26:54 PM:       values:
12:26:54 PM:         Access-Control-Allow-Origin: '*'
12:26:54 PM:   headersOrigin: config
12:26:54 PM:   redirects:
12:26:54 PM:     - from: https://pickerson.com/
12:26:54 PM:       status: 301
12:26:54 PM:       to: https://review-mate.com/
12:26:54 PM:     - from: http://pickerson.com/
12:26:54 PM:       status: 301
12:26:54 PM:       to: http://review-mate.com/
12:26:54 PM:     - from: https://myreviewmate.org/
12:26:54 PM:       status: 301
12:26:54 PM:       to: https://review-mate.com/
12:26:54 PM:     - from: http://myreviewmate.org/
12:26:54 PM:       status: 301
12:26:54 PM:       to: http://review-mate.com/
12:26:54 PM:   redirectsOrigin: config
12:26:54 PM: Caching artifacts
12:26:54 PM: Started saving node modules
12:26:54 PM: Finished saving node modules
12:26:54 PM: Started saving build plugins
12:26:54 PM: Finished saving build plugins
12:26:54 PM: Started saving yarn cache
12:26:59 PM: Finished saving yarn cache
12:26:59 PM: Started saving pip cache
12:26:59 PM: Finished saving pip cache
12:26:59 PM: Started saving emacs cask dependencies
12:26:59 PM: Finished saving emacs cask dependencies
12:26:59 PM: Started saving maven dependencies
12:26:59 PM: Finished saving maven dependencies
12:26:59 PM: Started saving boot dependencies
12:26:59 PM: Finished saving boot dependencies
12:26:59 PM: Started saving rust rustup cache
12:26:59 PM: Finished saving rust rustup cache
12:26:59 PM: Started saving go dependencies
12:26:59 PM: Finished saving go dependencies
12:26:59 PM: Build failed due to a user error: Build script returned non-zero exit code: 2
12:26:59 PM: Creating deploy upload records
12:26:59 PM: Failing build: Failed to build site
12:26:59 PM: Failed during stage 'building site': Build script returned non-zero exit code: 2 (https://ntl.fyi/exit-code-2)
12:26:59 PM: Finished processing build request in 43.36132463s

Hi, @KyleFontenot. The error is happening the the site’s build code. This is not code that Netlify has written so we need access to the source code to debug this. The repo for this site is private so there is no way for our support team to assist with this debugging.

If you can make a minimal reproduction repo (a repo where the error can be reliably triggered) which is public, please let us know and our support team can take another look at this.

I understand. Based on the scenario of it working on the local build, and only errors with remote images, I sort of ran out of ideas to troubleshoot besides some kind of url blocking or setting I haven’t found yet from within Netlify.
Since the reproduction of mine worked, I just migrated the project to it and everything works now. My best bet on what the culprit was maybe a conflicting vite plugin. Just strange that it would still work on a local build even with production env.
Thanks for hearing me out.