You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Next.js集成Sentry后生产环境源码显示_N_E问题求助

Next.js生产环境源码显示"_N_E"问题求助

我正在开发一个Next.js应用,集成了Sentry做错误追踪,但部署到生产环境后,Google Chrome开发者工具里的源码显示为"_N_E",希望找到解决方法让生产环境下源码能正常显示。

我的Next.js配置代码如下:

const { withSentryConfig } = require("@sentry/nextjs");

const nextConfig = {
  output: 'standalone',
  productionBrowserSourceMaps: true,
  trailingSlash: true,
  modularizeImports: {
    '@mui/icons-material': {
      transform: '@mui/icons-material/{{member}}',
    },
    '@mui/material': {
      transform: '@mui/material/{{member}}',
    },
    '@mui/lab': {
      transform: '@mui/lab/{{member}}',
    },
  },
  webpack(config) {
    config.module.rules.push({
      test: /\.svg$/,
      use: ['@svgr/webpack'],
    });
    return config;
  },
  sentry: {
    hideSourceMaps: true,
    disableLogger: true,
    transpileClientSDK: true,
  },
};

const sentryWebpackPluginOptions = {
  silent: true,
  // Project details redacted
  tunnelRoute: "/monitoring",
};

module.exports = withSentryConfig(nextConfig, sentryWebpackPluginOptions);

已尝试的解决方案:

  • 在Next.js配置中确保productionBrowserSourceMaps设为true;
  • 检查Sentry配置中是否存在隐藏source map的错误配置;
  • 搜索类似问题但未找到解决"_N_E"显示问题的方案。

有没有人遇到过该问题?或者能分析生产环境下源码显示为"_N_E"的原因?任何调试或解决建议都将非常感谢。

额外说明:Chrome中显示"_N_E"的源码截图已附上

内容的提问来源于stack exchange,提问作者Saad Mrabet

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.06.26 12:01:10