New build error on old working code

Hi all,

Got a small and interesting issue that I’m hoping someone can shed some light on for me.

I have a site that I’m working with the working name of superb-mermaid-c7c225. I’ve been systematically building this site over the last few weeks with no problems. Suddenly this morning my builds started failing… seeing as the work that I’m doing is minimal at the moment that seemed very odd. Reverting the changes and triggering a new build didn’t get rid of the error either… which caused me to attempt to rebuild a the currently live deploy that had obviously successfully built initially. This also failed with the same error.

The build error reads: “ERROR: Multiple exports with the same name” and it is a Sveltekit site that is not particularly complex. It builds perfectly when run locally. The Netlify build log is pasted below. I’m wondering if anyone else has experienced this and where I might begin to unravel an answer!

Thanks massively in advance. Any help is greatly appreciated.
Hein

12:10:20 PM: Build ready to start
12:10:22 PM: build-image version: d2c6dbeac570350a387d832f64bc980dc964ad65 (focal)
12:10:22 PM: build-image tag: v4.8.0
12:10:22 PM: buildbot version: f0ff221739bac4de60e9df6aad053e908497725c
12:10:22 PM: Fetching cached dependencies
12:10:23 PM: Finished downloading cache in 1.397029028s
12:10:23 PM: Starting to extract cache
12:10:28 PM: Finished extracting cache in 4.57783664s
12:10:28 PM: Finished fetching cache in 6.00101615s
12:10:28 PM: Starting to prepare the repo for build
12:10:28 PM: Preparing Git Reference refs/heads/master
12:10:29 PM: Parsing package.json dependencies
12:10:30 PM: Starting build script
12:10:30 PM: Installing dependencies
12:10:30 PM: Python version set to 2.7
12:10:30 PM: Started restoring cached node version
12:10:32 PM: Finished restoring cached node version
12:10:32 PM: v16.15.1 is already installed.
12:10:32 PM: Now using node v16.15.1 (npm v8.11.0)
12:10:32 PM: Started restoring cached build plugins
12:10:32 PM: Finished restoring cached build plugins
12:10:32 PM: Attempting ruby version 2.7.2, read from environment
12:10:33 PM: Using ruby version 2.7.2
12:10:34 PM: Using PHP version 8.0
12:10:34 PM: No npm workspaces detected
12:10:34 PM: Started restoring cached node modules
12:10:34 PM: Finished restoring cached node modules
12:10:34 PM: Started restoring cached go cache
12:10:34 PM: Finished restoring cached go cache
12:10:34 PM: go version go1.16.5 linux/amd64
12:10:34 PM: go version go1.16.5 linux/amd64
12:10:34 PM: Installing missing commands
12:10:34 PM: Verify run directory
12:10:36 PM: ​
12:10:36 PM: ────────────────────────────────────────────────────────────────
12:10:36 PM: Netlify Build
12:10:36 PM: ────────────────────────────────────────────────────────────────
12:10:36 PM: ​
12:10:36 PM: ❯ Version
12:10:36 PM: @netlify/build 27.1.4
12:10:36 PM: ​
12:10:36 PM: ❯ Flags
12:10:36 PM: baseRelDir: true
12:10:36 PM: buildId: 62a9b00c84a9d600084291d2
12:10:36 PM: deployId: 62a9b00c84a9d600084291d4
12:10:36 PM: ​
12:10:36 PM: ❯ Current directory
12:10:36 PM: /opt/build/repo
12:10:36 PM: ​
12:10:36 PM: ❯ Config file
12:10:36 PM: No config file was defined: using default values.
12:10:36 PM: ​
12:10:36 PM: ❯ Context
12:10:36 PM: production
12:10:36 PM: ​
12:10:36 PM: ────────────────────────────────────────────────────────────────
12:10:36 PM: 1. Build command from Netlify app
12:10:36 PM: ────────────────────────────────────────────────────────────────
12:10:36 PM: ​
12:10:36 PM: $ npm run build
12:10:36 PM: > br-cxc-22@0.0.1 build
12:10:36 PM: > npm run build_search && svelte-kit build
12:10:36 PM: > br-cxc-22@0.0.1 build_search
12:10:36 PM: > node src/scripts/build_search.js
12:10:39 PM: RESPONSE LENGTH: 100
12:10:40 PM: vite v2.8.6 building for production…
12:10:40 PM: transforming…
12:10:42 PM: 10:10:42 AM [vite-plugin-svelte] /opt/build/repo/src/lib/components/Header.svelte:140:1 Unused CSS selector “.top h1”
12:10:42 PM: 138: justify-items: center;
12:10:42 PM: 139: }
12:10:42 PM: 140: .top h1 {
12:10:42 PM: ^
12:10:42 PM: 141: text-align: center;
12:10:42 PM: 142: }
12:10:42 PM: 10:10:42 AM [vite-plugin-svelte] /opt/build/repo/src/lib/components/Header.svelte:267:2 Unused CSS selector “.top h1”
12:10:42 PM: 265: }
12:10:42 PM: 266:
12:10:42 PM: 267: .top h1 {
12:10:42 PM: ^
12:10:42 PM: 268: text-align: left;
12:10:42 PM: 269: }
12:10:42 PM: 10:10:42 AM [vite-plugin-svelte] /opt/build/repo/src/lib/components/Header.svelte:320:2 Unused CSS selector “h1”
12:10:42 PM: 318: }
12:10:42 PM: 319:
12:10:42 PM: 320: h1 {
12:10:42 PM: ^
12:10:42 PM: 321: font-size: 45px;
12:10:42 PM: 322: padding-left: calc(var(–padding) / 2);
12:10:43 PM: 10:10:43 AM [vite-plugin-svelte] /opt/build/repo/src/lib/components/Mobile_Menu.svelte:27:15 A11y: ‘’ is not a valid href attribute
12:10:43 PM: 25:

  • Podcasts

  • 12:10:43 PM: 26:
  • Tools & Apps

  • 12:10:43 PM: 27:
  • Change Personality Test

  • 12:10:43 PM: ^
    12:10:43 PM: 28:
    12:10:43 PM: 29: {/if}
    12:10:43 PM: 10:10:43 AM [vite-plugin-svelte] /opt/build/repo/src/lib/components/Mobile_Menu.svelte:81:15 A11y: ‘’ is not a valid href attribute
    12:10:43 PM: 79: {#if firstTier === ‘course’}
    12:10:43 PM: 80: <ul class=“submenu_second_tier” in:fly={{ y: -20 }}>
    12:10:43 PM: 81:
    12:10:43 PM: ^
    12:10:43 PM: 82:
  • Learn more

  • 12:10:43 PM: 83:

    12:10:43 PM: 10:10:43 AM [vite-plugin-svelte] /opt/build/repo/src/lib/components/Mobile_Menu.svelte:84:15 A11y: ‘’ is not a valid href attribute
    12:10:43 PM: 82:
  • Learn more

  • 12:10:43 PM: 83:
    12:10:43 PM: 84:
    12:10:43 PM: ^
    12:10:43 PM: 85:
  • Get started

  • 12:10:43 PM: 86:

    12:10:43 PM: 10:10:43 AM [vite-plugin-svelte] /opt/build/repo/src/lib/components/Mobile_Menu.svelte:117:28 Unused CSS selector “.submenu_second_tier h6”
    12:10:43 PM: 115: padding: var(–click_padding);
    12:10:43 PM: 116: }
    12:10:43 PM: 117: .submenu_first_tier h6, .submenu_second_tier h6 {
    12:10:43 PM: ^
    12:10:43 PM: 118: position: relative;
    12:10:43 PM: 119: }
    12:10:43 PM: 10:10:43 AM [vite-plugin-svelte] /opt/build/repo/src/lib/components/Card.svelte:4:11 Card has unused export property ‘illustrationBackup’. If it is for external reference only, please consider using export const illustrationBackup
    12:10:43 PM: 2: import { getComponent } from “$lib/services/getComponent”;
    12:10:43 PM: 3: export let illustration = https://picsum.photos/200?${Math.random()};
    12:10:43 PM: 4: export let illustrationBackup = https://picsum.photos/200?${Math.random()};
    12:10:43 PM: ^
    12:10:43 PM: 5: export let illustrationAlt = “”;
    12:10:43 PM: 6: export let heading = “”;
    12:10:43 PM: 10:10:43 AM [vite-plugin-svelte] /opt/build/repo/src/lib/components/Card.svelte:9:11 Card has unused export property ‘href’. If it is for external reference only, please consider using export const href
    12:10:43 PM: 7: export let excerpt = “”;
    12:10:43 PM: 8: export let author = “”;
    12:10:43 PM: 9: export let href = “”;
    12:10:43 PM: ^
    12:10:43 PM: 10: export let format = “”;
    12:10:43 PM: 11: export let slug = “”;
    12:10:43 PM: 10:10:43 AM [vite-plugin-svelte] /opt/build/repo/src/lib/components/Card_List.svelte:4:11 Card_List has unused export property ‘illustrationBackup’. If it is for external reference only, please consider using export const illustrationBackup
    12:10:43 PM: 2: import { getComponent } from “$lib/services/getComponent”;
    12:10:43 PM: 3: export let illustration = https://picsum.photos/200?${Math.random()};
    12:10:43 PM: 4: export let illustrationBackup = https://picsum.photos/200?${Math.random()};
    12:10:43 PM: ^
    12:10:43 PM: 5: export let illustrationAlt = “”;
    12:10:43 PM: 6: export let heading = “”;
    12:10:43 PM: 10:10:43 AM [vite-plugin-svelte] /opt/build/repo/src/lib/components/Card_List.svelte:9:11 Card_List has unused export property ‘href’. If it is for external reference only, please consider using export const href
    12:10:43 PM: 7: export let excerpt = “”;
    12:10:43 PM: 8: export let author = “”;
    12:10:43 PM: 9: export let href = “”;
    12:10:43 PM: ^
    12:10:43 PM: 10: export let format = “”;
    12:10:43 PM: 11: export let slug = “”;
    12:10:43 PM: 10:10:43 AM [vite-plugin-svelte] /opt/build/repo/src/lib/components/Card_Slide.svelte:4:11 Card_Slide has unused export property ‘illustrationBackup’. If it is for external reference only, please consider using export const illustrationBackup
    12:10:43 PM: 2: import { getComponent } from “$lib/services/getComponent”;
    12:10:43 PM: 3: export let illustration = https://picsum.photos/200?${Math.random()};
    12:10:43 PM: 4: export let illustrationBackup = https://picsum.photos/200?${Math.random()};
    12:10:43 PM: ^
    12:10:43 PM: 5: export let illustrationAlt = “”;
    12:10:43 PM: 6: export let heading = “”;
    12:10:43 PM: 10:10:43 AM [vite-plugin-svelte] /opt/build/repo/src/lib/components/Card_Slide.svelte:9:11 Card_Slide has unused export property ‘href’. If it is for external reference only, please consider using export const href
    12:10:43 PM: 7: export let excerpt = “”;
    12:10:43 PM: 8: export let author = “”;
    12:10:43 PM: 9: export let href = “”;
    12:10:43 PM: ^
    12:10:43 PM: 10: export let format = “”;
    12:10:43 PM: 11: export let slug = “”;
    12:10:46 PM: Creating deploy upload records
    12:10:45 PM: ✓ 85 modules transformed.
    12:10:45 PM: rendering chunks…
    12:10:45 PM: .svelte-kit/output/client/_app/manifest.json 5.51 KiB
    12:10:45 PM: .svelte-kit/output/client/_app/error.svelte-135230e2.js 1.56 KiB / gzip: 0.75 KiB
    12:10:45 PM: .svelte-kit/output/client/_app/pages/index.svelte-97e68eaf.js 5.45 KiB / gzip: 2.12 KiB
    12:10:46 PM: Failed during stage ‘building site’: Build script returned non-zero exit code: 2 (Search results for '"non-zero exit code: 2"' - Netlify Support Forums)
    12:10:45 PM: .svelte-kit/output/client/_app/pages/search.svelte-1f94ca64.js 3.49 KiB / gzip: 1.67 KiB
    12:10:45 PM: .svelte-kit/output/client/_app/pages/about.svelte-a9b728f1.js 2.41 KiB / gzip: 1.10 KiB
    12:10:45 PM: .svelte-kit/output/client/_app/pages/stream/index.svelte-ff259c95.js 11.43 KiB / gzip: 3.33 KiB
    12:10:45 PM: .svelte-kit/output/client/_app/pages/stream/type/index.svelte-4b77ec0c.js 1.76 KiB / gzip: 0.88 KiB
    12:10:45 PM: .svelte-kit/output/client/_app/start-e7a611f0.js 24.17 KiB / gzip: 8.40 KiB
    12:10:45 PM: .svelte-kit/output/client/_app/pages/tos.svelte-ff3a6b23.js 18.71 KiB / gzip: 5.22 KiB
    12:10:45 PM: .svelte-kit/output/client/_app/pages/pp.svelte-0e45bb2b.js 21.70 KiB / gzip: 6.05 KiB
    12:10:45 PM: .svelte-kit/output/client/_app/chunks/Divider-3c79cb64.js 1.16 KiB / gzip: 0.59 KiB
    12:10:45 PM: .svelte-kit/output/client/_app/chunks/Close-adb6228d.js 1.21 KiB / gzip: 0.62 KiB
    12:10:45 PM: .svelte-kit/output/client/_app/chunks/Chevron-0f757d2d.js 1.17 KiB / gzip: 0.66 KiB
    12:10:45 PM: .svelte-kit/output/client/_app/chunks/vendor-06e69f5a.js 10.80 KiB / gzip: 4.55 KiB
    12:10:45 PM: .svelte-kit/output/client/_app/chunks/api-3d4746b4.js 0.36 KiB / gzip: 0.22 KiB
    12:10:45 PM: .svelte-kit/output/client/_app/chunks/FeatureLabel-7fdd548a.js 0.99 KiB / gzip: 0.59 KiB
    12:10:45 PM: .svelte-kit/output/client/_app/chunks/env-6d58f0dd.js 0.03 KiB / gzip: 0.05 KiB
    12:10:45 PM: .svelte-kit/output/client/_app/assets/Divider-c01d9a13.css 0.09 KiB / gzip: 0.10 KiB
    12:10:45 PM: .svelte-kit/output/client/_app/assets/pages/index.svelte-8186dd6f.css 1.63 KiB / gzip: 0.44 KiB
    12:10:45 PM: .svelte-kit/output/client/_app/assets/Filter-d409c4e5.css 2.64 KiB / gzip: 0.73 KiB
    12:10:45 PM: .svelte-kit/output/client/_app/assets/pages/stream/index.svelte-98723438.css 2.93 KiB / gzip: 0.76 KiB
    12:10:45 PM: .svelte-kit/output/client/_app/chunks/Filter-1d4ce177.js 26.32 KiB / gzip: 5.98 KiB
    12:10:45 PM: .svelte-kit/output/client/_app/assets/ContentGrid-b5a3212f.css 4.22 KiB / gzip: 0.96 KiB
    12:10:45 PM: .svelte-kit/output/client/_app/assets/Chevron-e434e339.css 0.03 KiB / gzip: 0.05 KiB
    12:10:45 PM: .svelte-kit/output/client/_app/assets/pages/about.svelte-bf4528fa.css 0.11 KiB / gzip: 0.10 KiB
    12:10:45 PM: .svelte-kit/output/client/_app/assets/pages/__layout.svelte-eab2ac69.css 17.08 KiB / gzip: 3.43 KiB
    12:10:45 PM: .svelte-kit/output/client/_app/assets/FeatureLabel-3733815f.css 0.29 KiB / gzip: 0.16 KiB
    12:10:45 PM: .svelte-kit/output/client/_app/assets/pages/stream/type/slug.svelte-4102dd5b.css 5.11 KiB / gzip: 1.21 KiB
    12:10:45 PM: .svelte-kit/output/client/_app/pages/stream/type/slug.svelte-02ce6421.js 48.27 KiB / gzip: 30.31 KiB
    12:10:45 PM: .svelte-kit/output/client/_app/pages/__layout.svelte-8ed9817a.js 97.93 KiB / gzip: 32.06 KiB
    12:10:45 PM: .svelte-kit/output/client/_app/chunks/ContentGrid-dc922449.js 1104.83 KiB / gzip: 343.02 KiB
    12:10:45 PM:
    12:10:45 PM: (!) Some chunks are larger than 500 KiB after minification. Consider:
    12:10:45 PM: - Using dynamic import() to code-split the application
    12:10:45 PM: - Use build.rollupOptions.output.manualChunks to improve chunking: rollup.js
    12:10:45 PM: - Adjust chunk size limit for this warning via build.chunkSizeWarningLimit.
    12:10:45 PM: vite v2.8.6 building SSR bundle for production…
    12:10:45 PM: ✘ [ERROR] Multiple exports with the same name “prerender”
    12:10:45 PM: html:/opt/build/repo/src/routes/index.svelte:15:14:
    12:10:45 PM: 15 │ export const prerender = true;
    12:10:45 PM: ╵ ~~~~~~~~~
    12:10:45 PM: The name “prerender” was originally exported here:
    12:10:45 PM: html:/opt/build/repo/src/routes/index.svelte:3:14:
    12:10:45 PM: 3 │ export const prerender = true;
    12:10:45 PM: ╵ ~~~~~~~~~
    12:10:45 PM: ✘ [ERROR] The symbol “prerender” has already been declared
    12:10:45 PM: html:/opt/build/repo/src/routes/index.svelte:15:14:
    12:10:45 PM: 15 │ export const prerender = true;
    12:10:45 PM: ╵ ~~~~~~~~~
    12:10:45 PM: The symbol “prerender” was originally declared here:
    12:10:45 PM: html:/opt/build/repo/src/routes/index.svelte:3:14:
    12:10:45 PM: 3 │ export const prerender = true;
    12:10:45 PM: ╵ ~~~~~~~~~
    12:10:45 PM: ✘ [ERROR] Multiple exports with the same name “load”
    12:10:45 PM: html:/opt/build/repo/src/routes/index.svelte:20:23:
    12:10:45 PM: 20 │ export async function load({ params, fetch, session, stuff }) {
    12:10:45 PM: ╵ ~~~~
    12:10:45 PM: The name “load” was originally exported here:
    12:10:45 PM: html:/opt/build/repo/src/routes/index.svelte:9:14:
    12:10:45 PM: 9 │ export const load = () => staticFetch( searchdata as BR_POST, […
    12:10:45 PM: ╵ ~~~~
    12:10:45 PM: ✘ [ERROR] The symbol “load” has already been declared
    12:10:45 PM: html:/opt/build/repo/src/routes/index.svelte:20:23:
    12:10:45 PM: 20 │ export async function load({ params, fetch, session, stuff }) {
    12:10:45 PM: ╵ ~~~~
    12:10:45 PM: The symbol “load” was originally declared here:
    12:10:45 PM: html:/opt/build/repo/src/routes/index.svelte:9:14:
    12:10:45 PM: 9 │ export const load = () => staticFetch( searchdata as BR_POST, […
    12:10:45 PM: ╵ ~~~~
    12:10:45 PM: ✘ [ERROR] Multiple exports with the same name “load”
    12:10:45 PM: html:/opt/build/repo/src/routes/[stream]/[type]/[slug].svelte:47:23:
    12:10:45 PM: 47 │ export async function load({ params, fetch, session, stuff }) {
    12:10:45 PM: ╵ ~~~~
    12:10:45 PM: The name “load” was originally exported here:
    12:10:45 PM: html:/opt/build/repo/src/routes/[stream]/[type]/[slug].svelte:5:14:
    12:10:45 PM: 5 │ export const load = async ({ params, url }) => {
    12:10:45 PM: ╵ ~~~~
    12:10:45 PM: ✘ [ERROR] The symbol “load” has already been declared
    12:10:45 PM: html:/opt/build/repo/src/routes/[stream]/[type]/[slug].svelte:47:23:
    12:10:45 PM: 47 │ export async function load({ params, fetch, session, stuff }) {
    12:10:45 PM: ╵ ~~~~
    12:10:45 PM: The symbol “load” was originally declared here:
    12:10:45 PM: html:/opt/build/repo/src/routes/[stream]/[type]/[slug].svelte:5:14:
    12:10:45 PM: 5 │ export const load = async ({ params, url }) => {
    12:10:45 PM: ╵ ~~~~
    12:10:45 PM: > Build failed with 4 errors:
    12:10:45 PM: html:/opt/build/repo/src/routes/index.svelte:15:14: ERROR: Multiple exports with the same name “prerender”
    12:10:45 PM: html:/opt/build/repo/src/routes/index.svelte:15:14: ERROR: The symbol “prerender” has already been declared
    12:10:45 PM: html:/opt/build/repo/src/routes/index.svelte:20:23: ERROR: Multiple exports with the same name “load”
    12:10:45 PM: html:/opt/build/repo/src/routes/index.svelte:20:23: ERROR: The symbol “load” has already been declared
    12:10:45 PM: html:/opt/build/repo/src/routes/index.svelte:15:14: ERROR: Multiple exports with the same name “prerender”
    12:10:45 PM: html:/opt/build/repo/src/routes/index.svelte:15:14: ERROR: The symbol “prerender” has already been declared
    12:10:45 PM: html:/opt/build/repo/src/routes/index.svelte:20:23: ERROR: Multiple exports with the same name “load”
    12:10:45 PM: html:/opt/build/repo/src/routes/index.svelte:20:23: ERROR: The symbol “load” has already been declared
    12:10:45 PM: at failureErrorWithLog (/opt/build/repo/node_modules/esbuild/lib/main.js:1605:15)
    12:10:45 PM: at /opt/build/repo/node_modules/esbuild/lib/main.js:1251:28
    12:10:45 PM: at runOnEndCallbacks (/opt/build/repo/node_modules/esbuild/lib/main.js:1036:63)
    12:10:45 PM: at buildResponseToResult (/opt/build/repo/node_modules/esbuild/lib/main.js:1249:7)
    12:10:45 PM: at /opt/build/repo/node_modules/esbuild/lib/main.js:1358:14
    12:10:45 PM: at /opt/build/repo/node_modules/esbuild/lib/main.js:668:9
    12:10:45 PM: at handleIncomingPacket (/opt/build/repo/node_modules/esbuild/lib/main.js:765:9)
    12:10:45 PM: at Socket.readFromStdout (/opt/build/repo/node_modules/esbuild/lib/main.js:635:7)
    12:10:45 PM: at Socket.emit (node:events:527:28)
    12:10:45 PM: at addChunk (node:internal/streams/readable:315:12)
    12:10:45 PM: ​
    12:10:45 PM: ────────────────────────────────────────────────────────────────
    12:10:45 PM: “build.command” failed
    12:10:45 PM: ────────────────────────────────────────────────────────────────
    12:10:45 PM: ​
    12:10:45 PM: Error message
    12:10:45 PM: Command failed with exit code 1: npm run build (Search results for '"non-zero exit code: 1"' - Netlify Support Forums)
    12:10:45 PM: ​
    12:10:45 PM: Error location
    12:10:45 PM: In Build command from Netlify app:
    12:10:45 PM: npm run build
    12:10:45 PM: ​
    12:10:45 PM: Resolved config
    12:10:45 PM: build:
    12:10:45 PM: command: npm run build
    12:10:45 PM: commandOrigin: ui
    12:10:45 PM: publish: /opt/build/repo/build
    12:10:45 PM: publishOrigin: ui
    12:10:46 PM: Caching artifacts
    12:10:46 PM: Started saving node modules
    12:10:46 PM: Finished saving node modules
    12:10:46 PM: Started saving build plugins
    12:10:46 PM: Finished saving build plugins
    12:10:46 PM: Started saving pip cache
    12:10:46 PM: Finished saving pip cache
    12:10:46 PM: Started saving emacs cask dependencies
    12:10:46 PM: Finished saving emacs cask dependencies
    12:10:46 PM: Started saving maven dependencies
    12:10:46 PM: Finished saving maven dependencies
    12:10:46 PM: Started saving boot dependencies
    12:10:46 PM: Finished saving boot dependencies
    12:10:46 PM: Started saving rust rustup cache
    12:10:46 PM: Finished saving rust rustup cache
    12:10:46 PM: Started saving go dependencies
    12:10:46 PM: Finished saving go dependencies
    12:10:46 PM: Build failed due to a user error: Build script returned non-zero exit code: 2
    12:10:46 PM: Failing build: Failed to build site
    12:10:46 PM: Finished processing build request in 24.359564071s

    Ok - super strange for a few reasons but at least I found the superficial cause. As this site is in development, I have commented out code all over the place. In two components I have commented out the whole thing and rewritten another version above it, as a way to manually jump between two approaches.

    This commented out code was being read and causing the conflicts! So to be clear, I had a variable “load” declared in running code and another of the same name which was commented out, but the Netlify build was erroring out with “ERROR] Multiple exports with the same name “load””.

    Removing the commented out code allows the Netlify build to succeed. As mentioned, a local build was succeeding all along.

    Hope that helps anyone else that might be running into this. Would be great to know if this is intentional on the part of the way Netlify is set up or just a little bug of sorts.

    Either way, very big fan of Netlify and thanks for making such a great platform.
    Hein

    hi there hein,

    glad you got it to work - is it possible that the code wasn’t commented out all the way? the netlify build process isn’t really different than a local one per se, so i wonder whether this was maybe also not working on a local build?

    secondarily, this comes to mind - maybe warnings were being treated as errors?

    Hi Perry,

    Sorry for the late response I was aware of your message till a moment ago. I’m pretty confident that the code was commented out fully… as I mentioned, I ran local and netlify builds off the same code, with the former building and the latter failing. It could be that warnings were being treated as errors due to the env var you mentioned, but we’re still sitting with the question then of why commented out code is producing the warning? Anyways, what I normally find with these kinds of issues is that somewhere, somehow, I did something I shouldn’t have… with enough in(tro)spection, I’m sure this won’t be the exception! For now, I’ll just mark my ‘solve’ above as the solution.

    Thanks for your response btw, it is appreciated.
    H

    1 Like