vercel / next.js

The React Framework
https://nextjs.org
MIT License
124.9k stars 26.66k forks source link

Cannot send telemetry when build #69218

Open vuthanhtrung2010 opened 3 weeks ago

vuthanhtrung2010 commented 3 weeks ago

Link to the code that reproduces this issue

https://github.com/vuthanhtrung2010/url-shortener/actions/runs/10523360575/job/29157883339

To Reproduce

  1. Install dependencies
  2. Build
  3. Uh at sending telemetry thing I think, it errored as console shown in Github CI.

Current vs. Expected behavior

I expected it to build successfully. I have tried build lower version than v22. It works

Provide environment information

Operating system:
- Platform: Linux
- Arch: arm64
- Version: Ubuntu 20.04.6 LTS, release: 20.04, codename: focal
Binaries:
- npm: 10.8.2
- pnpm: 9.8.0
Revelant packages:
- Next: 14.2.5
- Typescript: ^5.5.4
Next.js cfg:

import MillionLint from "@million/lint";
import { withSentryConfig } from "@sentry/nextjs";
/** @type {import('next').NextConfig} */

const nextConfig = {
  logging: {
    fetches: {
      fullUrl: true,
    },
  },
  async headers() {
    return [
      {
        source: "/:path*",
        headers: [
          {
            key: "X-Frame-Options",
            value: "SAMEORIGIN",
          },
          {
            key: "Content-Security-Policy",
            value:
              "script-src 'self' 'unsafe-inline' 'unsafe-eval' https://static.cloudflareinsights.com; object-src 'none'; base-uri 'self'; frame-src 'self'",
          },
        ],
      },
    ];
  },
};

export default MillionLint.next({
  rsc: true,
})(
  withSentryConfig(nextConfig, {
    // For all available options, see:
    // https://github.com/getsentry/sentry-webpack-plugin#options

    org: "trung-development",
    project: "url-shortener",
    // Only print logs for uploading source maps in CI
    silent: !process.env.CI,
    authToken: process.env.SENTRY_AUTH_TOKEN,
    // For all available options, see:
    // https://docs.sentry.io/platforms/javascript/guides/nextjs/manual-setup/

    // Upload a larger set of source maps for prettier stack traces (increases build time)
    widenClientFileUpload: true,
    // Route browser requests to Sentry through a Next.js rewrite to circumvent ad-blockers.
    // This can increase your server load as well as your hosting bill.
    // Note: Check that the configured route will not match with your Next.js middleware, otherwise reporting of client-
    // side errors will fail.
    tunnelRoute: "/monitoring",
    // Hides source maps from generated client bundles
    hideSourceMaps: true,
    // Automatically tree-shake Sentry logger statements to reduce bundle size
    disableLogger: true,
    // Enables automatic instrumentation of Vercel Cron Monitors. (Does not yet work with App Router route handlers.)
    // See the following for more information:
    // https://docs.sentry.io/product/crons/
    // https://vercel.com/docs/cron-jobs
    automaticVercelMonitors: true,
  }),
);

Which area(s) are affected? (Select all that apply)

Not sure

Which stage(s) are affected? (Select all that apply)

next build (local)

Additional context

I tested my application on my VPS: It works on node v22.4.0 but latest version is v22.7.0 does not working?

vuthanhtrung2010 commented 3 weeks ago

Tested with 22.6.0 but 22.7.0 doesn't work. Thank you