Skip to content

Uncaught SyntaxError: Invalid regular expression: /[\n\r\u2028\u2029]/: Regular expression too large #11599

@kaizenlabs

Description

@kaizenlabs

Not sure what happened, all of a sudden Webpack is throwing the following error on the dev server on npm start. Nothing changed in the webpack config for React Scripts:

Uncaught SyntaxError: Invalid regular expression: /[\n\r\u2028\u2029]/: Regular expression too large

The error is coming from chunk.js, which is not something I'm touching during development and its with the following line:

var reNewLine = /[\n\r\u2028\u2029]/g;

I've tried removing and reinstalling node modules, upgraded downgraded React and react-scripts and react dom, I've tried switching node versions with nvm, and I've tried reverting back to an earlier branch commit where I knew the app was loading fine. Nothing works. Was working on app components and then this error just started popping up randomly.

Help!!! Lol

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions