vue-bulma / datepicker

Datepicker Component for Vue Bulma
MIT License
115 stars 56 forks source link

UglifyJs Unexpected token: punc () #45

Closed chimit closed 7 years ago

chimit commented 7 years ago

I can't build the project with WebPack. When I run npm run build I get:

ERROR in static/js/vendor.f5f763bc19f974345e9c.js from UglifyJs
Unexpected token: punc ()) [./~/vue-bulma-datepicker/src/BaseInput.js:6,0][static/js/vendor.f5f763bc19f974345e9c.js:5283,16]
angganegara commented 7 years ago

I had this problem and after a very frustrating google search, it seems you need to install Babel preset with shorthand-properties plugins.

Van-Vu commented 7 years ago

@angganegara could you elaborate please? I'm also facing the same issue

angganegara commented 7 years ago

@Van-Vu have you update the script to the latest version? it seems the error is no longer present.

you can also try changing the source file directly. look for this code : default: () => ({}) and replace it with : default: function() { return {} }

Van-Vu commented 7 years ago

@angganegara Yeah, I've just updated the latest babels and it works Sorry I should have done that before asking Thanks a lot !

larsjanssen6 commented 7 years ago

@Van-Vu sorry pretty new to all of this. How can I fix this? I use Laravel mix. I just ran npm update and so it has the newest version. Still receive that error ^?

Thanks a lot!

angganegara commented 7 years ago

@larsjanssen6 I only know the workaround for this. Open the file in node_modules/vue-bulma-datepicker/src/BasicInput.js and look for this code : default: () => ({}) and replace it with : default: function() { return {} }

larsjanssen6 commented 7 years ago

@angganegara thanks that works. Wondering now why this is not being changed within this package?

larsjanssen6 commented 7 years ago

@angganegara I already see there is a pull request for this sorry.

CryDeTaan commented 7 years ago

I am still getting this error even though I can see that BasicInput.js has been updated after npm update. Any ideas?

havgry commented 7 years ago

@CryDeTaan Yep, a new release including https://github.com/vue-bulma/datepicker/commit/bf7e6d48589b7c3952e395c3cea70260491a5ebf is still pending.

CryDeTaan commented 7 years ago

Perfect thanks, Implemented #67 manually in the meantime.

lpulatie commented 7 years ago

@fundon Any idea on when the new release will be?

KKSzymanowski commented 7 years ago

Before it's released you can pull the latest version by specifying the GitHub repository and the commit hash:

"dependencies": {
    "vue-bulma-datepicker": "git://github.com/vue-bulma/datepicker#bf7e6d4"
}
lpulatie commented 7 years ago

Thanks. That’s what I ended up doing.

On August 28, 2017 at 9:36:29 AM, Kuba Szymanowski (notifications@github.com) wrote:

Before it's released you can pull the latest version by specifying the GitHub repository and the commit hash:

"dependencies": { "vue-bulma-datepicker": "git://github.com/vue-bulma/datepicker#bf7e6d4" }

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/vue-bulma/datepicker/issues/45#issuecomment-325371567, or mute the thread https://github.com/notifications/unsubscribe-auth/AFBO0tjrmQaAIyXWeqkZusljTIkWW7eZks5sctBtgaJpZM4NcQHK .

janva255 commented 6 years ago

Can you please push a new release?

JeremieLapert commented 6 years ago

Can you please push a new release?

angganegara commented 6 years ago

just use this instead https://github.com/ankurk91/vue-flatpickr-component since the owner of this package doesn't seem to update anymore. I already did.

JeremieLapert commented 6 years ago

It"s done, it works !

thank you !