Comments (6)
For me had something similar issue:
I have upgrade from 14.2.7 => 14.2.8, and locally had no problems with the prod build, but at staging the server actions returned some html response, and was messed up everything.
from next.js.
The error message looks like gonna be fixed in #69749 and we will release a patch to get it fixed. I still like to ask for a reproduction that can help us reproduce it. It could either be a missing case or bad usage that might require changes in the future.
from next.js.
We patched a fix in 14.2.9, if it's the same issue with #69720, please upgrade to the new version ๐ I'll close this one for now, if it's a different issue, please submit with a full reproduction, thanks.
from next.js.
You aren't the only one affected by this issue, and it does not seem to be exclusive to server actions.
We have an in-house component library that uses the same compound component compoisiton pattern like you see in Radix UI, e.g. <Form.Control>
, and this seems to be causing issues with the latest version of 14.2.8 when building. Downgrading back to 14.2.7 causes the build step to work.
โฒ Next.js 14.2.8
- Experiments (use with caution):
ยท outputFileTracingRoot
Creating an optimized production build ...
โ Compiled successfully
Skipping linting
โ Checking validity of types
Collecting page data ...Error: Cannot access Form.Control on the server. You cannot dot into a client module from a server component. You can only pass the imported name through.
at Object.get (<PROJECT_ROOT>/node_modules/next/dist/compiled/next-server/app-page.runtime.prod.js:12:125427)
at <PROJECT_ROOT>/dist/apps/portal/.next/server/chunks/9394.js:1:7411
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
Error: Cannot access Form.Control on the server. You cannot dot into a client module from a server component. You can only pass the imported name through.
at Object.get (<PROJECT_ROOT>/node_modules/next/dist/compiled/next-server/app-page.runtime.prod.js:12:125427)
at <PROJECT_ROOT>/dist/apps/portal/.next/server/app/sitemap.xml/route.js:134:10521
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
I've checked through our code and removed all references to <Form.Control>
in our code in an attempt to debug the issue, but the issue still appears.
from next.js.
We cannot recreate the issue with the provided information. Please add a reproduction in order for us to be able to investigate.
Why was this issue marked with the 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>
.
I added a link, why was it still marked?
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.
What happens if I don't provide a sufficient minimal reproduction?
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.
I did not open this issue, but it is relevant to me, what can I do to help?
Anyone experiencing the same issue is welcome to provide a minimal reproduction following the above steps. Furthermore, you can upvote the issue using the ๐ 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.
I think my reproduction is good enough, why aren't you looking into it quicker?
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.
Useful Resources
- How to Contribute to Open Source (Next.js)
- How to create a Minimal, Complete, and Verifiable example
- Reporting a Next.js bug
- Next.js Triaging issues
from next.js.
@huozhi Can confirm that upgrading to 14.2.9 fixes this.
The curious thing is, we are not using compound components anywhere in our server actions, so I wonder how #69720 fixed the bug... but I'm not complaining as the build works now :) thanks again!
from next.js.
Related Issues (20)
- `<details>` element behaves incorrectly in Next.js 14/15 HOT 5
- Failed to find Server Action - next dev - v14.2.8 HOT 2
- HTTP Error 500.1002 - Internal Server Error HOT 1
- Relay compiler configuration "exclude" option is not respected HOT 2
- Scroll restoration issue. HOT 1
- Docs: Markdown and MDX seems like missing the required demo configs and cause build issues
- API is failing in server components but working in client components
- Server-side request forgery (SSRF)
- 'pnpm dev' stuck in loop in learn/dashboard-app/getting-started HOT 1
- `<a> ... </a> ` tag is used, instead of `<Link> ... </Link>` tag in basic template generated while creating a new next project. HOT 3
- v14.2.8 breaks pdfjs, 'canvas' not found HOT 2
- Next.js Vercel Domain issue
- Pages using searchParams do not cache HOT 4
- Web components styling not work with CSS Modules HOT 1
- Nextjs 15: Importing git modules issue - 'Module not found: Can't resolve 'package-name' HOT 2
- Link Component does not prefetch on network recovery. HOT 1
- FluentUI popover does not work in [email protected], but it does work in [email protected] HOT 1
- FluentUI popover does not work in [email protected], but it does work in [email protected]
- Rendering error on routes that fetch data with `revalidate`
- Stale data after navigation when using internal API and SSR (app router) HOT 8
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ๐๐๐
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from next.js.