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: name (MDCRipple) from UglifyJS

See original GitHub issue

I am using Laravel Mix to compile my assets. Laravel Mix has a script to compile minified assets.

npm run production

This, in turn, invokes UglifyJS to minify assets. During this step it throws an error.

Unexpected token: name (MDCRipple) [./~/@material/ripple/index.js:25,0]

I am using material-components-web version 0.8.0.

Issue Analytics

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

github_iconTop GitHub Comments

4reactions
Garbeecommented, Apr 27, 2017

@amrittb Your problem is you aren’t running js files through the babel-loader. There is no rule set for js files. Once you run the JS files through babel things compile properly.

I suspect what is going on for you @lpirola is around the same lines. You need to make sure the material component JS files get ran through babel. This means allowing node_module stuff to be compiled through babel.

1reaction
amrittbcommented, Apr 25, 2017

I have created a Demo Repository. Here - Test Repository

Read more comments on GitHub >

github_iconTop Results From Across the Web

UglifyJS webpack plugin throws: Unexpected token: name ...
My recommendation is Babelify to which I switched after having constant errors with Uglify. Edit: The problem might be in your new webpack....
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 >
SyntaxError: Unexpected token: name (xxxxxx) from Uglify ...
Using webpack.optimize.UglifyJsPlugin() in webpack.config throws SyntaxError: Unexpected token: name (xxxxxx) . The code there is unreachable.
Read more >
ERROR in file.js from UglifyJs SyntaxError: Unexpected token
Recently whilst upgrading from Webpack to Webpack2, I ran into this error which took a while to debug. I was seeing the following...
Read more >
MatBlazor/community - Gitter
Hi folks, I am new to Blazor and MatBlazor! I am having issues with closing a MatDialog component from a child component. Is...
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