Deploying a Statamic SSG site -- build fails

Sitename: marcelbootsman.netlify.app
Latest deploy log: Statamic build log · GitHub
Github Repo: GitHub - mbootsman/marcelbootsman-statamic

When deploying this statamic SSG website, I get an error in the build process:

failed to load config from /opt/build/repo/vite.config.js
11:50:00 AM: error during build:
11:50:00 AM: TypeError: Cannot read properties of undefined (reading 'startsWith')
11:50:00 AM:     at /opt/build/repo/vite.config.js:43:37
11:50:00 AM:     at loadConfigFromFile (file:///opt/build/repo/node_modules/vite/dist/node/chunks/dep-e8f070e8.js:64391:15)
11:50:00 AM:     at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
11:50:00 AM:     at async resolveConfig (file:///opt/build/repo/node_modules/vite/dist/node/chunks/dep-e8f070e8.js:63993:28)
11:50:00 AM:     at async build (file:///opt/build/repo/node_modules/vite/dist/node/chunks/dep-e8f070e8.js:46318:20)
11:50:00 AM:     at async CAC.<anonymous> (file:///opt/build/repo/node_modules/vite/dist/node/cli.js:812:9)

Any help is appreciated.
PS. Currently there’s a Hugo site deployed an published, that will be replaced by (the working) statamic ssg deployment

Looks like an error with the code, not something we can help you debug. You’re trying to use the string method on undefined.

Setting the APP_URL in the environment variables solved this issue.

oh thats awesome to hear thanks for coming back and sharing your solution with the community!