New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
v13 Server Components - Webpack error running data fetching method #43328
Comments
Based on the documentation, there is no default export in the case of ESM imports, but there still seems to be an issue as |
The error also occurs with |
Seems like this was fixed in #43349 - added |
Closing based on #43349 👍 Documentation can be found here: https://beta.nextjs.org/docs/api-reference/next.config.js#servercomponentsexternalpackages
|
This closed issue has been automatically locked because it had no new activity for a month. 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
What browser are you using? (if relevant)
Chrome 107.0.5304.110 (Official Build) (arm64)
Describe the Bug
I'm using
simple-git
to get the latest commit hash from a remote repo. While this works fine in API routes (seepages/api/hello
in the repro repo below), doing so in anapp
page (seeapp/page.tsx
) causes a server runtime error:Expected Behavior
I would have assumed that the execution context is the same for server-side data loading and API handlers.
Link to reproduction - Issues with a link to complete (but minimal) reproduction code will be addressed faster
https://github.com/jens-ox/nextjs-bug-app-ssr
To Reproduce
pnpm install
pnpm dev
GET /api/hello
--> works correctly and returns the latest commit hash from the Next.js repohttp://localhost:3000
in your browser -> will cause server errorThe text was updated successfully, but these errors were encountered: