eisuke
eisuke
CDCloudflare Developers
Created by eisuke on 1/10/2025 in #workers-help
"window is not defined" Error When Deploying Remix Project to Cloudflare Workers
What I'm trying to deploy my Remix project to Cloudflare Workers, but I'm encountering the following error:
Failed to publish your Function. Got error: Uncaught ReferenceError: window is not defined
at functionsWorker-0.38350223454284715.js:28168:5 in
../node_modules/.pnpm/[email protected][email protected]/node_modules/styletron-react/dist-browser-cjs/index.js
Failed to publish your Function. Got error: Uncaught ReferenceError: window is not defined
at functionsWorker-0.38350223454284715.js:28168:5 in
../node_modules/.pnpm/[email protected][email protected]/node_modules/styletron-react/dist-browser-cjs/index.js
Expectation The goal is to deploy the project successfully to Cloudflare Workers without any issues. Environment Remix: v2.15.2 styletron-react: v6.1.1 Cloudflare Workers Vite: v6.0.7 TypeScript: v5.7.2 Code https://github.com/eiei114/im-ts-frontend-template
3 replies