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

Getting [ERR_HTTP_HEADERS_SENT] when used with nextjs #59

Closed
ericlau-solid opened this issue Sep 28, 2020 · 3 comments
Closed

Getting [ERR_HTTP_HEADERS_SENT] when used with nextjs #59

ericlau-solid opened this issue Sep 28, 2020 · 3 comments

Comments

@ericlau-solid
Copy link

Getting this error when using cacheable-response with nextjs server:

web-error.logErrorError [ERR_HTTP_HEADERS_SENT]: Cannot set headers after they are sent to the client
    at ServerResponse.setHeader (_http_outgoing.js:518:11)
    at /opt/prd/web/releases/33428632e3a0c8b1fbbfab3aa86d7e955654f639/packages/web/node_modules/cacheable-response/index.js:38:9
    at /opt/prd/web/releases/33428632e3a0c8b1fbbfab3aa86d7e955654f639/packages/web/node_modules/cacheable-response/index.js:104:5
    at runMicrotasks (<anonymous>)
    at processTicksAndRejections (internal/process/task_queues.js:97:5)

Any attempt to catch / log at cacheable-response setup yields no console logs. It may be a nextjs issue but I can't tell from the stack trace.

@Kikobeats
Copy link
Owner

literally I can't do anything with this error report, also the title is not helping

@ericlau-solid ericlau-solid changed the title Getting Getting [ERR_HTTP_HEADERS_SENT] when used with nextjs Sep 28, 2020
@ericlau-solid
Copy link
Author

ericlau-solid commented Sep 28, 2020

Sorry for the sloppy title. Fixed. Also, this can stay closed as it turns out to be a nextjs issue. Apologies. vercel/next.js#12019

@Kikobeats
Copy link
Owner

No problem! I'll happy to add a note at README if special Next.js consideration should be taken 🙂

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

No branches or pull requests

2 participants