UglifyJS - Unexpected token: name (Simple)
See original GitHub issueWhen adding autobahn to my vue-js app, I have an error when trying to build for production using webpack 2.6 and UglifyJS :
ERROR in static/js/app.bdcd88ac9fe0000fe77f.js from UglifyJs
Unexpected token: name (Simple) [./~/cbor/lib/simple.js:9,0]
It seems to come from this lib : hildjj/node-cbor
I created an issue there too but I wanted to know if someone had encountered it and resolved it ?
Issue Analytics
- State:
- Created 6 years ago
- Comments:7 (1 by maintainers)
Top Results From Across the Web
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 webpack plugin throws: Unexpected token: name ...
Uglify cannot parse ES6 on its own( as far as I know), so you need to transpile your code down to ES5, post-processing...
Read more >Error in common.js from UglifyJs Unexpected token: name ...
ERROR in bundle.js from UglifyJs Unexpected token: name (urlParts) [bundle.js:4026,4] error Command failed with exit code 2. info Visit https ...
Read more >Build failed SyntaxError: Unexpected token: name (length)
In my case, i was using the vue truffle box and Uglify was the issue as it was the uglify that came with...
Read more >ERROR in build.js from UglifyJs Unexpected token: punc (()
The simplest way to get around this error is not to use the latest version of uglifyjs-webpack-plugin, but the version that was release...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
If you don’t use CBOR, and you wan’t to use the last version of autobahn, you can add this in the webpack module loaders :
{ test: require.resolve("cbor"), loader: "null-loader" }
This replace the cbor library by
empty
Then I have this error when running webpack dev compilation :