Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Uncaught ReferenceError: process is not defined #14

Closed
cuibonobo opened this issue Aug 21, 2021 · 1 comment
Closed

Uncaught ReferenceError: process is not defined #14

cuibonobo opened this issue Aug 21, 2021 · 1 comment
Labels

Comments

@cuibonobo
Copy link
Owner

Running npm run build and npm run preview throws the following error in the console:

Uncaught ReferenceError: process is not defined
    <anonymous> http://localhost:3000/_app/chunks/vendor-eb0ffce1.js:1
vendor-eb0ffce1.js:1:11014

The error seems to be coming from here:

var require$$0=getAugmentedNamespace(__viteBrowserExternal),old$1={},pathModule=require$$0,isWindows="win32"===process.platform,fs$4=require$$0;

So it seems like something in Vite is expecting process.platform to exist in a browser environment.

The strange thing about this error is that I don't see it in a new project initialized with npm init svelte@next my-app. If it was purely a Vite bug I would think it would reproduce in a new project as well. I need to get the Svelte Kit options in the test project closer to what I'm using in this repo until I can reproduce the bug.

@cuibonobo cuibonobo added the bug label Aug 21, 2021
@cuibonobo
Copy link
Owner Author

The above error only happens if I turn hydration on and I'm not going to bother with that right now. (I thought I would need to address this as a fix for #12, but I found a simpler way to fix that.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant