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.

unexpected token during minification

See original GitHub issue

Package + Version

  • @sentry/browser
  • @sentry/node
  • raven-js
  • raven-node (raven for node)
  • other:

Version:

4.0.0

Description

When minifying with the Terser plugin with Webpack (I had the same issue with Uglify when it was still supporting es6), the build fails with that error

Unexpected token: punc ()) [./node_modules/@sentry/browser/dist/index.js:2535,0]

This happens since the first release candidate. It’s working fine with the version 4.0.0-beta.12.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:5 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
polcocommented, Sep 19, 2018

just tried it, it’s working great, thanks @kamilogorek 😉

0reactions
Grawlcommented, Oct 3, 2019

just faced this issue

"@sentry/browser": "^5.6.3",
"gulp-terser": "^1.1.7",
"rollup": "^0.67.0",
Read more comments on GitHub >

github_iconTop Results From Across the Web

Unexpected token: operator (>) when trying to minify the ...
Apparently, your minifier doesn't understand arrow functions, or it needs some option to be set to know you're doing ES2015+ ("ES6+") stuff.
Read more >
Minification causes unexpected token '{' when targetting es5
When I'm bundling a main.js file with imports like this: import $ from ... Minification causes unexpected token '{' when targetting es5 #335....
Read more >
Minify causes “Uncaught SyntaxError”
Hi there,. Just updated my client's site with WP-Optimize 3.2.7 and cannot seem to reliably enable Minify anymore without it breaking JavaScript on...
Read more >
[SOLVED] packages/minifyStdJS/plugin/minify-js.js:49:25: ...
I am attempting to upgrade to meteor@2.4-rc.0 from meteor@2.2.3. Development with meteor run works fine. I am getting the following stack ...
Read more >
Syntax Error on js minification file
Uncaught SyntaxError: Invalid or unexpected token. in the minified main.js file. The error appears to be on the very last line of the ......
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