I had this error setting up Webpack:

SyntaxError: Invalid regular expression: /(\p{Uppercase_Letter}+|\p{Lowercase_Letter}|\d)(\p{Uppercase_Letter}+)/: Invalid escape

This was caused by some inconsistency between node version and webpack. 


npm install webpack@4.42.0 webpack-cli@3.3.11 webpack-dev-server@3.10.3 --save-dev

After this my command worked again!

npm run scripts:build



Saved you some valuable time?

Buy me a drink 🍺 to keep me motivated to create free content like this!