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

Unknown error when setting up NextJS config #171

Open
Janealter opened this issue Nov 10, 2024 · 2 comments
Open

Unknown error when setting up NextJS config #171

Janealter opened this issue Nov 10, 2024 · 2 comments

Comments

@Janealter
Copy link

Unknown error when setting up NextJS config:

Injecting property=output and value=export in:
import bundleAnalyzer from '@next/bundle-analyzer';
const withBundleAnalyzer = bundleAnalyzer({
  enabled: process.env.ANALYZE === 'true',
});
export default withBundleAnalyzer({
  reactStrictMode: false,
  eslint: {
    ignoreDuringBuilds: true,
  },
  experimental: {
    optimizePackageImports: ['@mantine/core', '@mantine/hooks'],
  },
});
Error: TypeError: error must be an instance of Error
@Janealter
Copy link
Author

As I tested, this is because my config contains

import bundleAnalyzer from '@next/bundle-analyzer';

const withBundleAnalyzer = bundleAnalyzer({
  enabled: process.env.ANALYZE === 'true',
});

@Janealter
Copy link
Author

I think this PR solves the issue - #161

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant