actions / configure-pages

An action to enable Pages and extract various metadata about a site. It can also be used to configure various static site generators we support as starter workflows.
https://pages.github.com
MIT License
149 stars 56 forks source link

Unknown error when setting up NextJS config #171

Open Janealter opened 2 weeks ago

Janealter commented 2 weeks ago

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 commented 2 weeks ago

As I tested, this is because my config contains

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

const withBundleAnalyzer = bundleAnalyzer({
  enabled: process.env.ANALYZE === 'true',
});
Janealter commented 2 weeks ago

I think this PR solves the issue - https://github.com/actions/configure-pages/pull/161