I have a SvelteKit site with the Netlify adapter installed. The site builds & deploys fine. But after I run npm run build locally, netlify dev starts having issues. It gives me a site that can’t find any generated js or css. The issue only exists with the site as served on the Netlify port (8888). When I run netlify dev, the underlying site at the SvelteKit dev port (5173) works fine.
If I delete the build folder that was generated during the build, netlify dev goes back to working normally. I don’t need to delete the files that were generated in the .netlify folder for it to start working again.
If I try to do netlify serve, I get the following error:
Error: ENOENT: no such file or directory, lstat ‘[base path].netlify\functions-serve.unzipped\sveltekit-render\sveltekit-render.js’
There is sveltekit-render.mjs in that folder, but not a .js.
Any ideas why building the site breaks netlify dev or why netlify serve isn’t working?
Thanks!
Bobby