davidmyersdev / vite-plugin-node-polyfills

A Vite plugin to polyfill Node's Core Modules for browser environments.
MIT License
263 stars 17 forks source link

v0.11 - ReferenceError [Error]: window is not defined #30

Closed bosticka closed 11 months ago

bosticka commented 11 months ago

v0.9 builds fine. Bumping to v0.11 causes this stack with same codebase everywhere else:

node:internal/event_target:1012 process.nextTick(() => { throw err; }); ^ ReferenceError [Error]: window is not defined at file:///home/build/block/client/.svelte-kit/output/server/chunks/index3.js:2:1 at ModuleJob.run (node:internal/modules/esm/module_job:194:25) Emitted 'error' event on Worker instance at: at [kOnErrorMessage] (node:internal/worker:300:10) at [kOnMessage] (node:internal/worker:311:37) at MessagePort. (node:internal/worker:212:57) at [nodejs.internal.kHybridDispatch] (node:internal/event_target:737:20) at exports.emitMessage (node:internal/per_context/messageport:23:28)

Node.js v18.16.0  ELIFECYCLE  Command failed with exit code 1.

bosticka commented 11 months ago

I tested v0.10 as well and it works. Issue is with v0.11 only.

Thanks!

softwarecurator commented 11 months ago

same issue 0.10 works 0.11 causes window to bug out

davidmyersdev commented 11 months ago

Duplicate of #29 (fixed in v0.11.1).