Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ERROR in build.js from UglifyJs #56

Closed
alcnsahin opened this issue May 12, 2021 · 1 comment
Closed

ERROR in build.js from UglifyJs #56

alcnsahin opened this issue May 12, 2021 · 1 comment

Comments

@alcnsahin
Copy link

Hello,

I am getting the following error while building a Vue.js application. How to fix it?

ERROR in build.js from UglifyJs Unexpected token: punc ()) [./node_modules/vue-toast-notification/dist/index.min.js:1,225][build.js:23778,189] npm ERR! code ELIFECYCLE npm ERR! errno 2 npm ERR! drmon-frontend@1.0.0 build: cross-env NODE_ENV=production webpack --progress --hide-modules npm ERR! Exit status 2

Thanks.

@ankurk91
Copy link
Owner

Hey,

What is your laravel-mix version?
Looks like you are using quite old version which is using UglifyJs rather than TerserJS

UglifyJs does not support parsing ES6 syntax.
Upgrade you laravel-mix to v5 or above which is using TerserJS

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants