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

cannot use new Response() on client #10278

Open
lifeiscontent opened this issue Nov 26, 2024 · 0 comments
Open

cannot use new Response() on client #10278

lifeiscontent opened this issue Nov 26, 2024 · 0 comments

Comments

@lifeiscontent
Copy link
Contributor

Reproduction

using latest remix + vite 5.2 using new Response() causes

x Build failed in 1.78s
[commonjs--resolver] Server-only module referenced by client

    './entry.server.js' imported by 'node_modules/.pnpm/@[email protected]_@[email protected]_@[email protected][email protected]_react@18._qsr4k2ekl5hqgeex62a7kcs2b4/node_modules/@vercel/remix/dist/edge/index.js'

  See https://remix.run/docs/en/main/guides/vite#splitting-up-client-and-server-code

during build, this might be specific to @vercel/remix though

System Info

System:
    OS: macOS 15.1.1
    CPU: (12) arm64 Apple M2 Max
    Memory: 10.06 GB / 64.00 GB
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 20.17.0 - /opt/homebrew/opt/node@20/bin/node
    npm: 10.8.2 - /opt/homebrew/opt/node@20/bin/npm
    pnpm: 9.11.0 - /opt/homebrew/opt/node@20/bin/pnpm
  Browsers:
    Chrome: 131.0.6778.86
    Safari: 18.1.1
  npmPackages:
    @remix-run/dev: 2.15.0 => 2.15.0 
    @remix-run/node: 2.15.0 => 2.15.0 
    @remix-run/react: 2.15.0 => 2.15.0 
    @remix-run/serve: 2.15.0 => 2.15.0 
    @remix-run/testing: 2.15.0 => 2.15.0 
    vite: 5.4.11 => 5.4.11

Used Package Manager

pnpm

Expected Behavior

I'd expect to be able to use new Response() anywhere

Actual Behavior

can only use new Response() on the server.

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

No branches or pull requests

1 participant