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

Next 13.2 new route handler bug #413

Closed
2 tasks done
brunoocal opened this issue Mar 2, 2023 · 7 comments
Closed
2 tasks done

Next 13.2 new route handler bug #413

brunoocal opened this issue Mar 2, 2023 · 7 comments

Comments

@brunoocal
Copy link

brunoocal commented Mar 2, 2023

Verify latest release

  • I verified that the issue exists in the latest chatgpt release

Verify webapp is working

  • I verify that the ChatGPT webapp is working properly for this account.

Environment details

NodeJS v19.0.1
Browser: Irrelevant
OS: Windows 11

Describe the Bug

Console throws this. My route handler is just an instance of ChatGPTAPI (official API) sending the text of a sendMessage() call.

image

@transitive-bullshit
Copy link
Owner

transitive-bullshit commented Mar 2, 2023

@brunoocal what keyv and keyv adaptor(s) are you using?

This was a known bug in keyv awhile back, but it should've been fixed in jaredwray/keyv#119

See also jaredwray/keyv#45

@brunoocal
Copy link
Author

None

@transitive-bullshit
Copy link
Owner

Okay; let me investigate a bit..

@transitive-bullshit
Copy link
Owner

@brunoocal just to try and repro, are you using appDir? and which package manager?

@brunoocal
Copy link
Author

Yes, It's in the appDir new route handler in Next 13.2 with latest npm version. I just tried the same code in pages/api and works perfectly

@transitive-bullshit
Copy link
Owner

Yeah; I'm able to repro it using next 13.2 w/ a route handler.

My suggestion for now would be to:

  1. Open a bug report on the next.js repo, since keyv is a pretty common NPM module, and their route handlers should support it without errors
  2. Use a pages/api handler for now until Next.js 13's beta features are more stable

If you end up creating an issue on the next.js repo, please link it to here so we can track progress.

Thanks!

@brunoocal
Copy link
Author

Thank you!

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