Skip to content
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

[🐛 Bug]: console.log in server component is not shown up in cloudflare function log #903

Open
1 task
kult0922 opened this issue Nov 3, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@kult0922
Copy link

kult0922 commented Nov 3, 2024

next-on-pages environment related information

System:
Platform: darwin
Arch: arm64
Version: Darwin Kernel Version 22.6.0: Fri Sep 15 13:41:28 PDT 2023; root:xnu-8796.141.3.700.8~1/RELEASE_ARM64_T6020
CPU: (12) arm64 Apple M2 Max
Memory: 32 GB
Shell: /opt/homebrew/bin/fish
Package Manager Used: npm (10.8.2)

Relevant Packages:
@cloudflare/next-on-pages: 1.13.5
vercel: 37.14.0
next: 14.2.5

Description

console.log in server components is shown up in terminal when local development.

export default function Home() {
  console.log("Home render");
  return (<div>Home</div>)
}

terminal

- event compiled client and server successfully in 901 ms (589 modules)
Home render

But, After deploying to cloudflare pages, this log is not shown up in function logs (cloudflare dashboard).
This log does not shown up in terminal when we use npx wrangler pages deployment tai command either.

The console.log in cloudflare page function is shown up in dashboard.
https://developers.cloudflare.com/pages/functions/debugging-and-logging/#view-logs-in-the-cloudflare-dashboard

So I think it would be great if console.log message shown up in dashboard.

Reproduction

  1. create project by official set up command.
npm create cloudflare@latest -- my-next-app --framework=next
  1. Write console.log in server components
  2. deploy add to Cloudflare Pages
  3. check function log in Cloudflare dashboard.

Pages Deployment Method

Direct Upload (wrangler pages publish or the @cloudflare/pages-action GitHub Action)

Pages Deployment ID

No response

Additional Information

No response

Would you like to help?

  • Would you like to help fixing this bug?
@kult0922 kult0922 added the bug Something isn't working label Nov 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant