question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

"Uncaught SyntaxError: Invalid regular expression" with "webpack -p" / ufligy-js

See original GitHub issue

When Webpack runs UglifyJS with tinyMCE imported, the output is broken and throws this in the console:

Uncaught SyntaxError: Invalid regular expression /...some very long garbage symbols here.../

(npm tinymce@4.5.1)

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Reactions:1
  • Comments:6

github_iconTop GitHub Comments

1reaction
AlastairTaftcommented, Feb 13, 2017

Getting the same issue as this.

charset="utf-8" on the script tags as mentioned in the linked post solved it for me.

1reaction
yuriyostapenkocommented, Dec 28, 2016

Thanks, that does the trick! I’ve made a PR for docs to cover this topic

Read more comments on GitHub >

github_iconTop Results From Across the Web

Webpack Error - Uncaught SyntaxError: Invalid regular ...
I've tried cleaning the npm cache, deleting package-lock.json and package.json, reinstalling node_modules. I've tried changing the node version ...
Read more >
How to fix SyntaxError: Invalid regular expression
This was caused by some inconsistency between node version and webpack. Solution. npm install webpack@4.42.0 webpack-cli@3.3.11 webpack-dev ...
Read more >
How I solved and debugged my Webpack issue through ...
When webpack bundles your source code, it can become difficult to track down errors and warnings to their original location.
Read more >
why is regexp /\-/u a syntax-error?
let rgx = /\-/u VM21:1 Uncaught SyntaxError: Invalid regular expression: /\-/: Invalid escape at <anonymous>:1:10. just, curious on reason why above ...
Read more >
uglify-js
JavaScript parser, mangler/compressor and beautifier toolkit. Latest version: 3.17.4, last published: 2 months ago. Start using uglify-js in ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found