Git Product home page Git Product logo

Comments (6)

fabicsp avatar fabicsp commented on September 15, 2024 1

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.

huozhi avatar huozhi commented on September 15, 2024 1

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.

huozhi avatar huozhi commented on September 15, 2024 1

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.

terrymun avatar terrymun commented on September 15, 2024

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.

github-actions avatar github-actions commented on September 15, 2024

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

from next.js.

terrymun avatar terrymun commented on September 15, 2024

@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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.