#Invalid regular expression error after upgrading from 14.0.0 to 14.2.3

1 messages · Page 1 of 1 (latest)

pseudo drumBOT
#

Hi @amber fractal. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave:

#

It seems like you're encountering a SyntaxError: Invalid regular expression after upgrading from Next.js 14.0.0 to 14.2.3. This issue might be related to changes in the way Next.js handles certain configurations or dependencies in your monorepo setup.

Here are a few steps you can take to troubleshoot and potentially resolve this issue:

  1. Check for Known Issues:

    • There have been several issues reported with Next.js versions 14.2.x. For example, Issue #64403 (https://github.com/vercel/next.js/issues/64403) discusses errors encountered during the build process in versions >= 14.2. You might find some relevant information or workarounds in the comments of that issue.
  2. Review Your Configuration:

    • Ensure that your next.config.js and other configuration files do not contain any deprecated or incompatible settings. Sometimes, upgrading Next.js requires updating configurations to match the new version's requirements.
  3. Update Dependencies:

    • Make sure all your dependencies are compatible with Next.js 14.2.3. This includes updating react, react-dom, and any other related packages. For example, the following versions were noted in a related issue:
      next: 14.3.0-canary.85
      react: 19.0.0-rc-f994737d14-20240522
      react-dom: 19.0.0-rc-f994737d14-20240522
      typescript: 5.1.3
      
  4. Check for Breaking Changes:

    • Review the Next.js release notes (https://github.com/vercel/next.js/releases) for any breaking changes introduced between versions 14.0.0 and 14.2.3. This can help identify if any specific changes might be causing the issue.
  5. Simplify the Regular Expression:

    • The error message indicates an issue with a regular expression in your Webpack configuration. Try simplifying or correcting the regular expression in your webpack-config.js file.
#
  1. Seek Community Help:
    • If the issue persists, consider opening a new issue on the Next.js GitHub repository (https://github.com/vercel/next.js/issues) with detailed information about your setup and the error. The community and maintainers can provide more targeted assistance.

If none of these steps resolve the issue, you might need to provide more specific details about your configuration and setup for further assistance.

Note: you can ask me a follow up question by @ mentioning me again :speech_balloon: