Closed volnei closed 9 months ago
I might want to add a bit of context of how I get the same error with intercepting routes using dynamic routes.
Operating system:
System Version: macOS 14.0 (23A5276g)
Kernel Version: Darwin 23.0.0
Arch: arm64
Binaries:
Node: 16.20.1
npm: 8.19.4
yarn: 1.22.19
pnpm: 7.12.2
Relevant packages:
next: 13.4.7
eslint-config-next: 13.4.7
react: 18.2.0
react-dom: 18.2.0
typescript: 5.1.5
App Directory
https://github.com/alserembani94/atifaimandev-v4/blob/dev/next.config.js
You can clone, and uncomment the
i18n
to replay the bug
I just add i18n
configuration in next.config.js
, while having app/[lang]
directory. Then, I get the error.
I already configure the dynamic route app/[lang]
to handle i18n
routing. I just want to add this configuration inside next.config.js
that should do route interception. However, I got this error instead when I try to run the project by running the following command:
pnpm dev
And this is the error:
- error Error [ERR_PACKAGE_PATH_NOT_EXPORTED]: Package subpath './server.edge' is not defined by "exports" in /Users/alserembani/alserembani/atifaimandev-v4/node_modules/.pnpm/next@13.4.7_biqbaboplfbrettd7655fr4n2y/node_modules/react-dom/package.json
at new NodeError (node:internal/errors:387:5)
at throwExportsNotFound (node:internal/modules/esm/resolve:365:9)
at packageExportsResolve (node:internal/modules/esm/resolve:649:3)
at resolveExports (node:internal/modules/cjs/loader:556:36)
at Function.Module._findPath (node:internal/modules/cjs/loader:596:31)
at Function.Module._resolveFilename (node:internal/modules/cjs/loader:1014:27)
at /Users/alserembani/alserembani/atifaimandev-v4/node_modules/.pnpm/next@13.4.7_biqbaboplfbrettd7655fr4n2y/node_modules/next/dist/server/require-hook.js:189:36
at Function.Module._load (node:internal/modules/cjs/loader:873:27)
at Module.require (node:internal/modules/cjs/loader:1100:19)
at require (node:internal/modules/cjs/helpers:108:18)
at /Users/alserembani/alserembani/atifaimandev-v4/node_modules/.pnpm/next@13.4.7_biqbaboplfbrettd7655fr4n2y/node_modules/next/dist/server/app-render/app-render.js:980:37
at /Users/alserembani/alserembani/atifaimandev-v4/node_modules/.pnpm/next@13.4.7_biqbaboplfbrettd7655fr4n2y/node_modules/next/dist/server/lib/trace/tracer.js:159:62
at /Users/alserembani/alserembani/atifaimandev-v4/node_modules/.pnpm/next@13.4.7_biqbaboplfbrettd7655fr4n2y/node_modules/next/dist/server/lib/trace/tracer.js:117:36
at NoopContextManager.with (/Users/alserembani/alserembani/atifaimandev-v4/node_modules/.pnpm/next@13.4.7_biqbaboplfbrettd7655fr4n2y/node_modules/next/dist/compiled/@opentelemetry/api/index.js:1:7057)
at ContextAPI.with (/Users/alserembani/alserembani/atifaimandev-v4/node_modules/.pnpm/next@13.4.7_biqbaboplfbrettd7655fr4n2y/node_modules/next/dist/compiled/@opentelemetry/api/index.js:1:516)
at NoopTracer.startActiveSpan (/Users/alserembani/alserembani/atifaimandev-v4/node_modules/.pnpm/next@13.4.7_biqbaboplfbrettd7655fr4n2y/node_modules/next/dist/compiled/@opentelemetry/api/index.js:1:18086)
at ProxyTracer.startActiveSpan (/Users/alserembani/alserembani/atifaimandev-v4/node_modules/.pnpm/next@13.4.7_biqbaboplfbrettd7655fr4n2y/node_modules/next/dist/compiled/@opentelemetry/api/index.js:1:18847)
at /Users/alserembani/alserembani/atifaimandev-v4/node_modules/.pnpm/next@13.4.7_biqbaboplfbrettd7655fr4n2y/node_modules/next/dist/server/lib/trace/tracer.js:106:107
at NoopContextManager.with (/Users/alserembani/alserembani/atifaimandev-v4/node_modules/.pnpm/next@13.4.7_biqbaboplfbrettd7655fr4n2y/node_modules/next/dist/compiled/@opentelemetry/api/index.js:1:7057)
at ContextAPI.with (/Users/alserembani/alserembani/atifaimandev-v4/node_modules/.pnpm/next@13.4.7_biqbaboplfbrettd7655fr4n2y/node_modules/next/dist/compiled/@opentelemetry/api/index.js:1:516)
at NextTracerImpl.trace (/Users/alserembani/alserembani/atifaimandev-v4/node_modules/.pnpm/next@13.4.7_biqbaboplfbrettd7655fr4n2y/node_modules/next/dist/server/lib/trace/tracer.js:106:32)
at /Users/alserembani/alserembani/atifaimandev-v4/node_modules/.pnpm/next@13.4.7_biqbaboplfbrettd7655fr4n2y/node_modules/next/dist/server/lib/trace/tracer.js:159:31
at wrappedRender (/Users/alserembani/alserembani/atifaimandev-v4/node_modules/.pnpm/next@13.4.7_biqbaboplfbrettd7655fr4n2y/node_modules/next/dist/server/app-render/app-render.js:1028:62)
at processTicksAndRejections (node:internal/process/task_queues:96:5) {
digest: undefined
}
Works with i18n
routing as expected.
Chrome, Arc
Vercel
Same here. Took me a couple of hours to find. Commenting out the i18n
in my next.config.js makes it work.
Can also be reproduced in https://github.com/vercel-labs/nextgram
As i18n
is enabled in the default starter, imo this is an urgent bug, as many people will run into this when trying out intercepting routes.
Same thing with me, it doesn't work using i18n enabled, i'm using the app router and the intercepting routes is completely ignored. My project needs i18n, so WTF Vercel?
That’s why Vercel is highly criticized in the market when you take a look at their products. What’s worse, they’re not honest enough to clarify. I think the Vercel CEO is falling short in many ways. It’s a shame.
@hadnet I kindly ask you to follow our code of conduct when commenting. Frustration is perfectly fine, but your comments do not contribute to resolving the issue. Thanks for understanding!
If you don't have a reproduction, the best contribution is to :+1: the original post so that we know it needs to be prioritized. I'm looking into this now. The reason it might have been initially ignored is that the OP did not include a reproduction.
I was checking https://github.com/vercel/next.js/issues/51414#issuecomment-1615085698 but I cannot see intercepting routes in that reproduction, so anyone having the same issue, could you please link to one? :pray:
We cannot recreate the issue with the provided information. Please add a reproduction in order for us to be able to investigate.
please add a complete reproduction
label?To be able to investigate, we need access to a reproduction to identify what triggered the issue. We prefer a link to a public GitHub repository (template for App Router, template for Pages Router), but you can also use these templates: CodeSandbox: App Router or CodeSandbox: Pages Router.
To make sure the issue is resolved as quickly as possible, please make sure that the reproduction is as minimal as possible. This means that you should remove unnecessary code, files, and dependencies that do not contribute to the issue. Ensure your reproduction does not depend on secrets, 3rd party registries, private dependencies, or any other data that cannot be made public. Avoid a reproduction including a whole monorepo (unless relevant to the issue). The easier it is to reproduce the issue, the quicker we can help.
Please test your reproduction against the latest version of Next.js (next@canary
) to make sure your issue has not already been fixed.
If you cannot create a clean reproduction, another way you can help the maintainers' job is to pinpoint the canary
version of next
that introduced the issue. Check out our releases, and try to find the first canary
release that introduced the issue. This will help us narrow down the scope of the issue, and possibly point to the PR/code change that introduced it. You can install a specific version of next
by running npm install next@<version>
.
Ensure the link is pointing to a codebase that is accessible (e.g. not a private repository). "example.com", "n/a", "will add later", etc. are not acceptable links -- we need to see a public codebase. See the above section for accepted links.
Issues with the please add a complete reproduction
label that receives no meaningful activity (e.g. new comments with a reproduction link) are automatically closed and locked after 30 days.
If your issue has not been resolved in that time and it has been closed/locked, please open a new issue with the required reproduction.
Anyone experiencing the same issue is welcome to provide a minimal reproduction following the above steps. Furthermore, you can upvote the issue using the :+1: reaction on the topmost comment (please do not comment "I have the same issue" without reproduction steps). Then, we can sort issues by votes to prioritize.
We look into every Next.js issue and constantly monitor open issues for new comments.
However, sometimes we might miss one or two due to the popularity/high traffic of the repository. We apologize, and kindly ask you to refrain from tagging core maintainers, as that will usually not result in increased priority.
Upvoting issues to show your interest will help us prioritize and address them as quickly as possible. That said, every issue is important to us, and if an issue gets closed by accident, we encourage you to open a new one linking to the old issue and we will look into it.
👋 @balazsorban44! There is a reproduction of a similar case with intercepting routes in https://github.com/vercel/next.js/issues/53170. The title of the issue is different, but it might have the same root cause. You can also find a few incoming links below my report. I guess there is a bunch of issues originating from a single bug, which can potentially be solved all at once.
Thanks @kachkaev! I'm looking into that issue right now. I'll be closing this one manually, if anyone having the same issue and has a complete but minimal reproduction with next@canary
, feel free to open a new issue, and we will follow up!
This closed issue has been automatically locked because it had no new activity for 2 weeks. If you are running into a similar issue, please create a new issue with the steps to reproduce. Thank you.
Verify canary release
Provide environment information
Which area(s) of Next.js are affected? (leave empty if unsure)
App directory (appDir: true)
Link to the code that reproduces this issue or a replay of the bug
private
To Reproduce
Create a dynamic route [team] and a intercept route @[team].
Describe the Bug
When tryed to create a dynamic route using intercepting next throw an error.
Expected Behavior
Works like intercepting routes expected.
Which browser are you using? (if relevant)
Chrome
How are you deploying your application? (if relevant)
Vercel