The Problem
While migrating my SvelteKit project to the latest version, I'm encountering the following error
Error: failed to load module for ssr: ../environment.js
at instantiateModule (file:///Users/userName/projectFolder/projectName/node_modules/vite/dist/node/chunks/dep-557f29e6.js:53336:15)
What I Did
I followed the migration instructions located here.
- I ran
npx svelte-migrate routesinside my terminal to start the migration - I replaced
$app/envwith$app/environmentthroughout my project - I installed the latest version of
vite - Made sure I had the latest version of
SvelteKitinstalled.
Similar StackOverflow question for reference
Problems with SSR and Firebase in the latest SvelteKit release
Though the location of this person's problem is different, at the core, they are very similar. Any insight into what I can do to resolve this issue would be greatly appreciated.