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
Next.js build Error "export * from '...' in a page is disallowed" #6111
Comments
Routing to @getsentry/ops for triage. ⏲️ |
Routing to @getsentry/team-web-sdk-frontend for triage. ⏲️ |
1 similar comment
Routing to @getsentry/team-web-sdk-frontend for triage. ⏲️ |
I have a feeling that this is a duplicate of #6085 which we just fixed. Just to confirm: Are you running |
Yes, I'm able to reproduce this on Windows, but not WSL2/Linux |
Cool, we just released in version For now, I will close this issue as it is a duplicate of #6085 |
Thanks! I will try update tonight, will keep you posted |
Environment
SaaS (https://sentry.io/)
Version
7.17.3
Steps to Reproduce
step 1: yarn add @sentry/nextjs
step 2: npx @sentry/wizard -i nextjs
step 3: migrated file next.config.wizardcopy.js
/** @type {import('next').NextConfig} */
const { withSentryConfig } = require('@sentry/nextjs');
const nextConfig = {
reactStrictMode: true,
swcMinify: true,
sentry: {
// Use
hidden-source-map
rather thansource-map
as the Webpackdevtool
// for client-side builds. (This will be the default starting in
//
@sentry/nextjs
version 8.0.0.) See// https://webpack.js.org/configuration/devtool/ and
// https://docs.sentry.io/platforms/javascript/guides/nextjs/manual-setup/#use-hidden-source-map
// for more information.
hideSourceMaps: false,
},
};
const sentryWebpackPluginOptions = {
// Additional config options for the Sentry Webpack plugin. Keep in mind that
// the following options are set automatically, and overriding them is not
// recommended:
// release, url, org, project, authToken, configFile, stripPrefix,
// urlPrefix, include, ignore
silent: true, // Suppresses all logs
// For all available options, see:
// https://github.com/getsentry/sentry-webpack-plugin#options.
};
// Make sure adding Sentry options is the last code to run before exporting, to
// ensure that your source maps include changes from all other Webpack plugins
module.exports = withSentryConfig(nextConfig, sentryWebpackPluginOptions);
Expected Result
It would be expected that everything would work out fine
Actual Result
error - ./src/pages/_app.tsx
Error:
x Using
export * from '...'
in a page is disallowed. Please useexport { default } from '...'
instead.| Read more: https://nextjs.org/docs/messages/export-all-in-page
,----
2 | export * from './_app.tsx?sentry_wrapped';
: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
`----
I don't know if this error already occurred as it's the first time I'm testing sentry for nextjs.
I tested it on nextjs 12 and the error is also happening.
I would like help to know if I'm doing something wrong or if it's a possible bug
The text was updated successfully, but these errors were encountered: