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.

[2.1.0] UglifyJs Unexpected token: operator (>) [./~/vue-flatpickr-component/src/index.js:4,0]

See original GitHub issue
[X] Other : support

Hello,

I’ve integrated your component (thanks for it !) but src/index.js makes my production webpack build fail with this message

ERROR in vendor.9cd50ac0.js from UglifyJs
Unexpected token: operator (>) [./~/vue-flatpickr-component/src/index.js:4,0][vendor.9cd50ac0.js:9,147031]

Seems related to es6 syntax in file below, but I have no idea about a fix.

 install: (Vue, options) => {
    Vue.component('flat-pickr', component);
    require('flatpickr/dist/flatpickr.css');  

Any suggestion ? Thx

Issue Analytics

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

github_iconTop GitHub Comments

1reaction
ankurk91commented, Jul 15, 2017

@kermorgant Version 2.4.0 should fix your issue. npm install vue-flatpickr-component@latest I was using right ES6 syntax but i dont know why Uglify JS was unable to parse it.

0reactions
rekperocommented, Apr 5, 2019

Yeah I know about that

On Fri, 5 Apr 2019, 19:12 Ankur Kumar, notifications@github.com wrote:

Do you about stackoverflow?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/ankurk91/vue-flatpickr-component/issues/3#issuecomment-480279954, or mute the thread https://github.com/notifications/unsubscribe-auth/AhIwsneXoUZiuIs-Ha3Dv-3u1MaV7owtks5vd1LUgaJpZM4OO54C .

Read more comments on GitHub >

github_iconTop Results From Across the Web

Unexpected token: operator (>) from UglifyJs - Stack Overflow
It seems like the error comes from an arrow function in the file escape-key.js . This is ES6 syntax and UglifyJS can't parse...
Read more >
Bug, UglifyJs Unexpected token: operator (>) #593 - GitHub
What is the current behaviour? error when building. ✖ ERROR bundle.70001.js from UglifyJs Unexpected token: operator (>) [bundle.70001.js: ...
Read more >
How I Fixed: UglifyJs Unexpected token: name (DropIn)
I've been trying – in vain – to build the front end for CodeReviewVideos. The issue I have been hitting upon is as...
Read more >
UglifyJs error on production build - sage - Roots Discourse
When building a production build I get this error: scripts/main_0282ea08.js from UglifyJs Unexpected token: operator (>) [scripts/main_0282ea08.js:471,43].
Read more >
Unexpected token: operator (>) from UglifyJs - Vue Forum
So for me modifying my webpack.config.js from to use new UglifyJsPlugin() rather than new webpack.optimize.UglifyJsPlugin() fixed the issue.
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