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.

UglifyJS - Unexpected token: name (Simple)

See original GitHub issue

When 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 ?

https://github.com/hildjj/node-cbor/issues/57

Issue Analytics

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

github_iconTop GitHub Comments

3reactions
Dodobibicommented, Jul 3, 2017

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

0reactions
adrlencommented, Jul 6, 2017

Then I have this error when running webpack dev compilation :

ERROR  Failed to compile with 2 errors

This dependency was not found:

* cbor in ./~/autobahn/lib/autobahn.js, ./~/autobahn/lib/serializer.js
Read more comments on GitHub >

github_iconTop 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 >

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