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

NextApiRequest'body property error when usr Turbopack #44319

Closed
1 task done
cd711 opened this issue Dec 24, 2022 · 3 comments
Closed
1 task done

NextApiRequest'body property error when usr Turbopack #44319

cd711 opened this issue Dec 24, 2022 · 3 comments
Labels
bug Issue was opened via the bug report template. stale The issue has not seen recent activity. TypeScript Related to types with Next.js.

Comments

@cd711
Copy link

cd711 commented Dec 24, 2022

Verify canary release

  • I verified that the issue exists in the latest Next.js canary release

Provide environment information

Operating System:
Platform: darwin
Arch: x64
Version: Darwin Kernel Version 22.1.0: Sun Oct 9 20:14:54 PDT 2022; root:xnu-8792.41.9~2/RELEASE_X86_64
Binaries:
Node: 16.19.0
npm: 9.2.0
Yarn: 1.22.17
pnpm: 7.18.2
Relevant packages:
next: 13.1.0
eslint-config-next: 13.0.7
react: 18.2.0
react-dom: 18.2.0

warn - Latest canary version not detected, detected: "13.1.0", newest: "13.1.1-canary.0".
Please try the latest canary version (npm install next@canary) to confirm the issue still exists before creating a new issue.
Read more - https://nextjs.org/docs/messages/opening-an-issue

Which area(s) of Next.js are affected? (leave empty if unsure)

App directory (appDir: true), CLI (create-next-app), Turbopack (--turbo), TypeScript

Link to the code that reproduces this issue

unnecessary

To Reproduce

pnpm create next-app --experimental-app

and edit the pages/api/hellow.ts and a test page to call the fetch function
pnpm dev #(next dev --turbo)

Describe the Bug

In pages/api/lellow.ts
export default async function (req: NextApiRequest, res: NextApiResponse) { //this is'a string (--turbo),but without --turbo or build the project . this is an object (right) const data = req.body; }

Request headers and body
Content-Length: 54 Content-Type: application/json

{"account":"aa","password":"accdcdc","type":"account"}

Expected Behavior

req.body should be an object

Which browser are you using? (if relevant)

No response

How are you deploying your application? (if relevant)

No response

@cd711 cd711 added the bug Issue was opened via the bug report template. label Dec 24, 2022
@github-actions github-actions bot added the TypeScript Related to types with Next.js. label Dec 24, 2022
@cd711
Copy link
Author

cd711 commented Dec 24, 2022

--turbo req.headers.cookie is undefined
And many other information is missing from the headers

@vercel-release-bot
Copy link
Collaborator

This issue has been automatically marked as stale due to two years of inactivity. It will be closed in 7 days unless there’s further input. If you believe this issue is still relevant, please leave a comment or provide updated details. Thank you.

@vercel-release-bot vercel-release-bot added the stale The issue has not seen recent activity. label Jan 12, 2025
@nextjs-bot
Copy link
Collaborator

This issue has been automatically closed due to two years of inactivity. If you’re still experiencing a similar problem or have additional details to share, please open a new issue following our current issue template. Your updated report helps us investigate and address concerns more efficiently. Thank you for your understanding!

@nextjs-bot nextjs-bot closed this as not planned Won't fix, can't repro, duplicate, stale Jan 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issue was opened via the bug report template. stale The issue has not seen recent activity. TypeScript Related to types with Next.js.
Projects
None yet
Development

No branches or pull requests

3 participants