-
Notifications
You must be signed in to change notification settings - Fork 30.3k
Closed as not planned
Closed as not planned
Copy link
Labels
bugIssue was opened via the bug report template.Issue was opened via the bug report template.lockedstaleThe issue has not seen recent activity.The issue has not seen recent activity.
Description
Link to the code that reproduces this issue or a replay of the bug
https://github.com/wilkinsonjack1993/next-js-webpack-bug
To Reproduce
- Install deps with pnpm
- run webapp from root:
pnpm run dev:web - go to
localhost:3000/test- observe that pages directory pages load as expected - go to
localhost:3000observe that page load fails with error:Error: Currently React only supports one RSC renderer at a time. - Go to
next.config.jsand remove the following:
webpack: (config, options) => {
if (options.isServer) {
config.externals = [
"react",
"next-i18next",
"react-dom",
...config.externals,
];
}
config.resolve.alias["react"] = path.resolve(
__dirname,
".",
"node_modules",
"react"
);
config.resolve.alias["next-i18next"] = path.resolve(
__dirname,
".",
"node_modules",
"next-i18next"
);
config.resolve.alias["react-dom"] = path.resolve(
__dirname,
".",
"node_modules",
"react-dom"
);
return config;
},
- Run the dev server again and see that the app directory page now loads correctly
Current vs. Expected behavior
Expected: App directory page loads correctly
Actual: Error: Currently React only supports one RSC renderer at a time.
Verify canary release
- I verified that the issue exists in the latest Next.js canary release
Provide environment information
"node": v16.15.1
"react": "^18.2.0",
"react-dom": "^18.2.0",
"next": "13.4.19",
"pnpm": 8.6.6Which area(s) are affected? (Select all that apply)
App Router
Additional context
We have this configuration to get around the issue described here.
We use are using transpilePackages but that also has the same issue as the old next-transpile-modules package when it comes to resolving peer dependencies in packages.
Metadata
Metadata
Assignees
Labels
bugIssue was opened via the bug report template.Issue was opened via the bug report template.lockedstaleThe issue has not seen recent activity.The issue has not seen recent activity.