SvelteKit site deployed on Netlify, but some pages get 500 error

Specifics: This is a small SvelteKit app pulling some content in from HygraphCMS
Of course works on my local machine :slight_smile:
Builds successfully on Netlify EXCEPT the inner pages which I made to be +page.server.svelte pages
Netlify URL: https://63ab8b30c19bc70008cc3dad--dapper-sunshine-944804.netlify.app/

Log file:
7:17:53 PM: build-image version: d55944c047ef0aee2ac01971edde72cb2a50acfe (focal)
7:17:53 PM: build-image tag: v4.16.1
7:17:53 PM: buildbot version: 0be68edd034c744ad79b207db44f42646b4e8ecb
7:17:54 PM: Fetching cached dependencies
7:17:54 PM: Starting to download cache of 95.6MB
7:17:55 PM: Finished downloading cache in 1.28683923s
7:17:55 PM: Starting to extract cache
7:17:56 PM: Finished extracting cache in 867.5344ms
7:17:56 PM: Finished fetching cache in 2.206254314s
7:17:56 PM: Starting to prepare the repo for build
7:17:56 PM: Preparing Git Reference refs/heads/master
7:17:56 PM: Parsing package.json dependencies
7:17:58 PM: Starting build script
7:17:58 PM: Installing dependencies
7:17:58 PM: Python version set to 2.7
7:17:58 PM: Started restoring cached node version
7:17:58 PM: Finished restoring cached node version
7:17:59 PM: v16.19.0 is already installed.
7:17:59 PM: Now using node v16.19.0 (npm v8.19.3)
7:17:59 PM: Enabling node corepack
7:17:59 PM: Started restoring cached build plugins
7:17:59 PM: Finished restoring cached build plugins
7:17:59 PM: Attempting ruby version 2.7.2, read from environment
7:18:00 PM: Using ruby version 2.7.2
7:18:00 PM: Using PHP version 8.0
7:18:00 PM: No npm workspaces detected
7:18:00 PM: Started restoring cached node modules
7:18:00 PM: Finished restoring cached node modules
7:18:01 PM: Started restoring cached go cache
7:18:01 PM: Finished restoring cached go cache
7:18:02 PM: go version go1.19.4 linux/amd64
7:18:02 PM: Detected 1 framework(s)
7:18:02 PM: β€œsvelte-kit” at version β€œ1.0.0-next.589”
7:18:02 PM: Installing missing commands
7:18:02 PM: Verify run directory
7:18:02 PM: Section completed: initializing
7:18:04 PM: ​
7:18:04 PM: Netlify Build
7:18:04 PM: ────────────────────────────────────────────────────────────────
7:18:04 PM: ​
7:18:04 PM: ❯ Version
7:18:04 PM: @netlify/build 29.2.1
7:18:04 PM: ​
7:18:04 PM: ❯ Flags
7:18:04 PM: baseRelDir: true
7:18:04 PM: buildId: 63ab8b30c19bc70008cc3dab
7:18:04 PM: deployId: 63ab8b30c19bc70008cc3dad
7:18:04 PM: ​
7:18:04 PM: ❯ Current directory
7:18:04 PM: /opt/build/repo
7:18:04 PM: ​
7:18:04 PM: ❯ Config file
7:18:04 PM: /opt/build/repo/netlify.toml
7:18:04 PM: ​
7:18:04 PM: ❯ Context
7:18:04 PM: production
7:18:04 PM: ​
7:18:04 PM: 1. build.command from netlify.toml
7:18:04 PM: ────────────────────────────────────────────────────────────────
7:18:04 PM: ​
7:18:04 PM: $ npm run build
7:18:04 PM: > solo-challenge@0.0.1 build
7:18:04 PM: > vite build
7:18:04 PM: β–² [WARNING] Cannot find base config file β€œ./.svelte-kit/tsconfig.json” [tsconfig.json]
7:18:04 PM: tsconfig.json:2:13:
7:18:04 PM: 2 β”‚ β€œextends”: β€œ./.svelte-kit/tsconfig.json”,
7:18:04 PM: β•΅ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
7:18:05 PM: vite v4.0.3 building for production…
7:18:05 PM: transforming…
7:18:06 PM: :blossom: daisyUI components 2.46.0 https://daisyui.com
7:18:06 PM: :heavy_check_mark:︎ Including: base, components, 29 themes, utilities
7:18:06 PM: :heart:︎ Support daisyUI: daisyUI component library - Open Collective
7:18:06 PM: 12:18:06 AM [vite-plugin-svelte] /src/lib/components/Hero.svelte:25:76 Security: Anchor with β€œtarget=_blank” should have rel attribute containing the value β€œnoreferrer”
7:18:06 PM: 23: class=β€œmt-4 text-center text-base leading-normal dark:text-gray-300 md:m-auto md:mt-4 md:w-7/12 lg:prose-xl lg:m-0 lg:mt-5 lg:w-11/12 lg:text-left xl:w-10/12”
7:18:06 PM: 24: >
7:18:06 PM: 25: A minimal journal of my 2022 sailing adventure competing in the <a
7:18:06 PM: ^
7:18:06 PM: 26: class=β€œunderline decoration-1 hover:underline-offset-8”
7:18:06 PM: 27: href=β€œErie Solo Challenge – Great Lakes Singlehanded Society”
7:18:06 PM: :blossom: daisyUI components 2.46.0 https://daisyui.com
7:18:07 PM: :heavy_check_mark:︎ Including: base, components, 29 themes, utilities
7:18:07 PM: :heart:︎ Support daisyUI: daisyUI component library - Open Collective
7:18:07 PM: ./sailboat-hr-test-op.svg referenced in /opt/build/repo/src/routes/posts/+page.svelte?svelte&type=style&lang.css didn’t resolve at build time, it will remain unchanged to be resolved at runtimeβœ“ 59 modules transformed.
7:18:07 PM: 12:18:07 AM [vite-plugin-svelte] dom compile done.
7:18:07 PM: package files time avg
7:18:07 PM: solo-challenge 13 0.36s 27.5ms
7:18:07 PM: rendering chunks…
7:18:07 PM: vite v4.0.3 building SSR bundle for production…
7:18:07 PM: transforming…
7:18:08 PM: 12:18:08 AM [vite-plugin-svelte] /src/lib/components/Hero.svelte:25:76 Security: Anchor with β€œtarget=_blank” should have rel attribute containing the value β€œnoreferrer”
7:18:08 PM: 23: class=β€œmt-4 text-center text-base leading-normal dark:text-gray-300 md:m-auto md:mt-4 md:w-7/12 lg:prose-xl lg:m-0 lg:mt-5 lg:w-11/12 lg:text-left xl:w-10/12”
7:18:08 PM: 24: >
7:18:08 PM: 25: A minimal journal of my 2022 sailing adventure competing in the <a
7:18:08 PM: ^
7:18:08 PM: 26: class=β€œunderline decoration-1 hover:underline-offset-8”
7:18:08 PM: 27: href=β€œErie Solo Challenge – Great Lakes Singlehanded Society”
7:18:08 PM: ./sailboat-hr-test-op.svg referenced in /opt/build/repo/src/routes/posts/+page.svelte?svelte&type=style&lang.css didn’t resolve at build time, it will remain unchanged to be resolved at runtimeβœ“ 63 modules transformed.
7:18:08 PM: 12:18:08 AM [vite-plugin-svelte] ssr compile done.
7:18:08 PM: package files time avg
7:18:08 PM: solo-challenge 13 74.4ms 5.7ms
7:18:08 PM: Generated an empty chunk: β€œhooks”.
7:18:08 PM: rendering chunks…
7:18:08 PM: .svelte-kit/output/server/vite-manifest.json 2.72 kB
7:18:08 PM: .svelte-kit/output/server/chunks/hooks.js 0.00 kB
7:18:08 PM: .svelte-kit/output/server/entries/pages/notes/_page.svelte.js 0.22 kB
7:18:08 PM: .svelte-kit/output/server/chunks/db.js 0.27 kB
7:18:08 PM: .svelte-kit/output/server/entries/pages/posts/_page.server.ts.js 0.40 kB
7:18:08 PM: .svelte-kit/output/server/entries/pages/posts/slug/_page.server.ts.js 0.48 kB
7:18:08 PM: .svelte-kit/output/server/chunks/Title.js 0.71 kB
7:18:08 PM: .svelte-kit/output/server/entries/fallbacks/error.svelte.js 0.79 kB
7:18:08 PM: .svelte-kit/output/server/entries/pages/posts/slug/_page.svelte.js 1.10 kB
7:18:08 PM: .svelte-kit/output/server/chunks/index2.js 1.12 kB
7:18:08 PM: .svelte-kit/output/server/entries/pages/_layout.svelte.js 3.38 kB
7:18:08 PM: .svelte-kit/output/server/chunks/index.js 3.62 kB
7:18:08 PM: .svelte-kit/output/server/entries/pages/_page.svelte.js 5.03 kB
7:18:08 PM: .svelte-kit/output/server/entries/pages/posts/_page.svelte.js 5.79 kB
7:18:08 PM: .svelte-kit/output/server/index.js 77.85 kB
7:18:08 PM: Run npm run preview to preview your production build locally.
7:18:08 PM: computing gzip size…
7:18:08 PM: .svelte-kit/output/client/_app/version.json 0.03 kB
7:18:08 PM: .svelte-kit/output/client/vite-manifest.json 4.89 kB
7:18:08 PM: .svelte-kit/output/client/_app/immutable/assets/_page-45754227.css 0.07 kB β”‚ gzip: 0.08 kB
7:18:08 PM: .svelte-kit/output/client/_app/immutable/assets/Title-ac628d48.css 0.10 kB β”‚ gzip: 0.10 kB
7:18:08 PM: .svelte-kit/output/client/_app/immutable/assets/_page-aa3d5a49.css 0.24 kB β”‚ gzip: 0.16 kB
7:18:08 PM: .svelte-kit/output/client/_app/immutable/assets/_page-0d7a5daf.css 2.80 kB β”‚ gzip: 0.70 kB
7:18:08 PM: .svelte-kit/output/client/_app/immutable/assets/_layout-6dd91afe.css 62.23 kB β”‚ gzip: 11.02 kB
7:18:08 PM: .svelte-kit/output/client/_app/immutable/chunks/1-1c6fe983.js 0.09 kB β”‚ gzip: 0.10 kB
7:18:08 PM: .svelte-kit/output/client/_app/immutable/chunks/2-d08bd7a9.js 0.10 kB β”‚ gzip: 0.10 kB
7:18:08 PM: .svelte-kit/output/client/_app/immutable/chunks/0-73981fe9.js 0.10 kB β”‚ gzip: 0.10 kB
7:18:08 PM: .svelte-kit/output/client/_app/immutable/chunks/3-ae1e07d6.js 0.10 kB β”‚ gzip: 0.10 kB
7:18:08 PM: .svelte-kit/output/client/_app/immutable/chunks/4-bd613130.js 0.12 kB β”‚ gzip: 0.12 kB
7:18:08 PM: .svelte-kit/output/client/_app/immutable/chunks/5-e0758f87.js 0.13 kB β”‚ gzip: 0.13 kB
7:18:08 PM: .svelte-kit/output/client/_app/immutable/components/pages/notes/_page.svelte-83458566.js 0.39 kB β”‚ gzip: 0.29 kB
7:18:08 PM: .svelte-kit/output/client/_app/immutable/chunks/Title-26907288.js 0.66 kB β”‚ gzip: 0.46 kB
7:18:08 PM: .svelte-kit/output/client/_app/immutable/components/error.svelte-6926f33d.js 0.98 kB β”‚ gzip: 0.57 kB
7:18:08 PM: .svelte-kit/output/client/_app/immutable/chunks/singletons-37a0903c.js 2.58 kB β”‚ gzip: 1.34 kB
7:18:08 PM: .svelte-kit/output/client/_app/immutable/components/pages/posts/_page.svelte-11c6c364.js 4.87 kB β”‚ gzip: 2.12 kB
7:18:08 PM: .svelte-kit/output/client/_app/immutable/chunks/index-953fe873.js 7.17 kB β”‚ gzip: 2.90 kB
7:18:08 PM: .svelte-kit/output/client/_app/immutable/components/pages/_page.svelte-a802d07b.js 7.56 kB β”‚ gzip: 2.52 kB
7:18:08 PM: .svelte-kit/output/client/_app/immutable/components/pages/_layout.svelte-3199ae48.js 11.25 kB β”‚ gzip: 3.75 kB
7:18:08 PM: .svelte-kit/output/client/_app/immutable/start-b01ec282.js 27.23 kB β”‚ gzip: 10.56 kB
7:18:08 PM: .svelte-kit/output/client/_app/immutable/components/pages/posts/slug/_page.svelte-5c384696.js 38.42 kB β”‚ gzip: 12.43 kB
7:18:08 PM:
7:18:08 PM: > Using @sveltejs/adapter-netlify
7:18:08 PM: :heavy_check_mark: done
7:18:08 PM: ​
7:18:08 PM: (build.command completed in 4.5s)
7:18:08 PM: ​
7:18:08 PM: 2. Functions bundling
7:18:08 PM: ────────────────────────────────────────────────────────────────
7:18:08 PM: ​
7:18:08 PM: Packaging Functions from .netlify/functions-internal directory:
7:18:08 PM: - render.mjs
7:18:08 PM: ​
7:18:09 PM: ​
7:18:09 PM: (Functions bundling completed in 861ms)
7:18:09 PM: ​
7:18:09 PM: 3. Deploy site
7:18:09 PM: ────────────────────────────────────────────────────────────────
7:18:09 PM: ​
7:18:09 PM: Starting to deploy site from β€˜build’
7:18:09 PM: Creating deploy tree
7:18:09 PM: 2 new files to upload
7:18:09 PM: 1 new functions to upload
7:18:16 PM: Section completed: deploying
7:18:16 PM: Site deploy was successfully initiated
7:18:16 PM: ​
7:18:16 PM: (Deploy site completed in 6.8s)
7:18:16 PM: Starting post processing
7:18:16 PM: ​
7:18:16 PM: Netlify Build Complete
7:18:16 PM: ────────────────────────────────────────────────────────────────
7:18:16 PM: Post processing - HTML
7:18:16 PM: ​
7:18:16 PM: (Netlify Build completed in 12.2s)
7:18:16 PM: Caching artifacts
7:18:16 PM: Post processing - header rules
7:18:16 PM: Started saving node modules
7:18:16 PM: Finished saving node modules
7:18:16 PM: Started saving build plugins
7:18:16 PM: Post processing - redirect rules
7:18:16 PM: Finished saving build plugins
7:18:16 PM: Started saving pip cache
7:18:16 PM: Finished saving pip cache
7:18:17 PM: Post processing done
7:18:16 PM: Started saving emacs cask dependencies
7:18:16 PM: Finished saving emacs cask dependencies
7:18:16 PM: Started saving maven dependencies
7:18:17 PM: Section completed: postprocessing
7:18:16 PM: Finished saving maven dependencies
7:18:16 PM: Started saving boot dependencies
7:18:16 PM: Finished saving boot dependencies
7:18:16 PM: Started saving rust rustup cache
7:18:16 PM: Finished saving rust rustup cache
7:18:16 PM: Started saving go dependencies
7:18:16 PM: Finished saving go dependencies
7:18:16 PM: Build script success
7:18:16 PM: Section completed: building
7:18:17 PM: Uploading Cache of size 95.6MB
7:18:18 PM: Section completed: cleanup
7:18:18 PM: Finished processing build request in 24.431167707s
7:18:20 PM: Site is live :sparkles:

** Not sure why the β€˜posts’ portion are not showing…as mentioned (you have heard this 1000 times) it’s fine running locally :slight_smile:
ANY help is appreciated! Thank you!

Error looks pretty straight forward - looks like you’re incorrectly referencing the config file, it’s a relative link?

1 Like

@Oddman Thank you so much for looking. I did an β€œI’m too tired thing” and forgot to enter my Environment Variable into my Site Settings! My bad! :roll_eyes: it’s working now!!

*Curious though which Config file were you referring to?

All good, glad I could be of help :slight_smile:

Hi @Oddman :wave:t6: thank you for chiming in and helping @Fourwhitesocks resolve his error. We appreciate the help! :smiling_face_with_three_hearts:

@Oddman @SamO Yes thank you both! I had totally missed that warning about the Config file, I do see that now… so weird because when I β€œcontrol click” on it inside of the tsconfig.json file it does go directly to the actual file inside of my .svelte-kit file… anyway thanks again!

1 Like