next js collision in turborepo
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 142k
- Forks
- 32.4k
- Avg merge
- 2d 14h
- Merged PRs (30d)
- 351
Description
Link to the code that reproduces this issue
https://codesandbox.io/p/devbox/vercel-next-js-reproduction-template-pages-2cz5ks
To Reproduce
La propiedad "[INTERNALS]" falta en el tipo "import("/Users/nicolas/Desktop/testing/carvuk-monorepo-clients/node_modules/.pnpm/next@13.4.12_react-dom@18.2.0_react@18.2.0/node_modules/next/dist/server/web/spec-extension/request").NextRequest", pero es obligatoria en el tipo "import("/Users/nicolas/Desktop/testing/carvuk-monorepo-clients/node_modules/.pnpm/next@14.0.1_react-dom@18.2.0_react@18.2.0/node_modules/next/dist/server/web/spec-extension/request").NextRequest".
From the error I could see that is conflict with different versions of next js in the same monorepo (turborepo). This is the middleware for checking auth from supabase
Current vs. Expected behavior
Expected to not be wrong by typescript
Current is the other way around
Verify canary release
- I verified that the issue exists in the latest Next.js canary release
Provide environment information
no able to run it in monorepo
Which area(s) are affected? (Select all that apply)
Middleware / Edge (API routes, runtime)
Additional context
No response
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the linked CodeSandbox reproduction and the Middleware / Edge area, focusing on the reported TypeScript collision between next@13.4.12 and next@14.0.1 in a monorepo. Reproduce the error if possible; done means the middleware type-checks without conflicting NextRequest definitions.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, nextjs, typescript
- Domain
- api, backend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Active
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100