I'm using the latest version Nextjs. The project is running fine when testing and running in developer mode. When I try a production build npx next build --debug
I get the error below. The output doesn't tell me much about what the problem is. Any ideas how to get the verbose information from this error?
HookWebpackError: Expected an opening square bracket.
Build error occurred Error: > Build failed because of webpack errors at /Users/xxx/projects/nextjs/my-next-website/node_modules/next/dist/build/index.js:17:924 at async Span.traceAsyncFn (/Users/xxx/projects/nextjs/my-next-website/node_modules/next/dist/telemetry/trace/trace.js:6:584)