prismic-next icon indicating copy to clipboard operation
prismic-next copied to clipboard

The types for Nextjs NextApiRequestLike definitions

Open sarunast opened this issue 1 year ago • 1 comments

Versions

  • @prismicio/next: 1.5.0
  • next: 14.0.4
  • node: 21.6.1

Reproduction

NextApiRequestLike types query does not match Next.js types. According to next.js types this value does not exist. I tried both app and pages. Same error.

TS2322: Type
IncomingMessage & {     cookies: Partial<{         [key: string]: string;     }>; }
is not assignable to type NextApiRequestLike | undefined
Property query is missing in type
IncomingMessage & {     cookies: Partial<{         [key: string]: string;     }>; }
but required in type NextApiRequestLike

sarunast avatar Jan 29 '24 15:01 sarunast

This issue has been labeled as a bug since it was created using the 🚨 Bug Report Template.

Hi there, thank you so much for the report!

Following our Maintenance Process, we will review your bug report and get back to you next Wednesday. To ensure a smooth review of your issue and avoid unnecessary delays, please make sure your issue includes the following:

  • Information about your environment and packages you use (Node.js version, package names and their versions, etc.) Feel free to attach a copy of your package.json file.
  • Any troubleshooting steps you already went through
  • A minimal reproduction of the issue, and/or instructions on how to reproduce it

If you have identified the cause of the bug described in your report and know how to fix it, you're more than welcome to open a pull request address it. Check out our quick start guide for a simple contribution process.

If you think your issue is a question (not a bug) and would like quicker support, please close this issue and forward it to an appropriate section on our community forum: https://community.prismic.io

- The Prismic Open-Source Team

github-actions[bot] avatar Jan 29 '24 15:01 github-actions[bot]