BennyKok / comfyui-deploy

An open source `vercel` like deployment platform for Comfy UI
https://comfydeploy.ing
GNU Affero General Public License v3.0
982 stars 126 forks source link

Running `bun dev` throws Request is not defined error #2

Closed flov closed 9 months ago

flov commented 9 months ago

Hi guys,

great effort! I came across this project while searching for a way to deploy my comfyui workflows. This is just what I was searching for. I tried to get it running locally, but I'm running into issues. I managed to set up the docker images in docker-compose, but when I'm running bun dev I get this error:

~/code/comfyui-deploy/web ‹main*› » bun dev
$ next dev
/Users/florian.vallen/code/comfyui-deploy/web/node_modules/.pnpm/next@14.0.3_react-dom@18.0.0_react@18.0.0/node_modules/next/dist/server/web/spec-extension/request.js:28
class NextRequest extends Request {
                          ^

ReferenceError: Request is not defined
    at Object.<anonymous> (/Users/florian.vallen/code/comfyui-deploy/web/node_modules/.pnpm/next@14.0.3_react-dom@18.0.0_react@18.0.0/node_modules/next/dist/server/web/spec-extension/request.js:28:27)
    at Module._compile (node:internal/modules/cjs/loader:1165:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1219:10)
    at Module.load (node:internal/modules/cjs/loader:1043:32)
    at Function.Module._load (node:internal/modules/cjs/loader:878:12)
    at Module.require (node:internal/modules/cjs/loader:1067:19)
    at Module.mod.require (/Users/florian.vallen/code/comfyui-deploy/web/node_modules/.pnpm/next@14.0.3_react-dom@18.0.0_react@18.0.0/node_modules/next/dist/server/require-hook.js:64:28)
    at require (node:internal/modules/cjs/helpers:103:18)
    at Object.<anonymous> (/Users/florian.vallen/code/comfyui-deploy/web/node_modules/.pnpm/next@14.0.3_react-dom@18.0.0_react@18.0.0/node_modules/next/dist/server/web/spec-extension/adapters/next-request.js:37:18)
    at Module._compile (node:internal/modules/cjs/loader:1165:14)

Does anyone know what I can do about this?

Thanks, Florian

KineticHub commented 9 months ago

@flov I had the same issue, it's based on this: https://github.com/vercel/next.js/issues/57214

Tl;Dr: Use nvm use --lts then try running it again.

BennyKok commented 9 months ago

I didn't know about this! thanks for spotting this out! Please let me know how setting it locally works for you guys. It would be great if you guys also write about self-hosting guides for others!