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

"Unexpected character" error when running UglifyJS #70

Closed
ocean opened this issue Sep 15, 2017 · 6 comments
Closed

"Unexpected character" error when running UglifyJS #70

ocean opened this issue Sep 15, 2017 · 6 comments

Comments

@ocean
Copy link

ocean commented Sep 15, 2017

Hi there, thanks for the handy library.

I wondered if someone else had had the same issue I'm having, but it doesn't look like it.

I'm building a React app, and while compiling the production build with Webpack I was getting an error from UglifyJS and the Webpack was refusing to finish the build:

ERROR in news-centre.js from UglifyJs
Unexpected character '℘' [news-centre.js:30752,2]

The line number (in my uncompressed dev version of the file) corresponds to this line in the strman entitiesencode.js file (or maybe the decode one).

I would have thought this character would be fine, like all the other Unicode characters your library supports, but 🤷‍♂️

@dleitee
Copy link
Owner

dleitee commented Sep 15, 2017

Hey @ocean

Are you using babel to transpile node_modules?

@ocean
Copy link
Author

ocean commented Sep 19, 2017

Not directly. Webpack is configured to look for modules inside node_modules.

Should I perhaps be logging this as an UglifyJS issue instead of here?

@sebas5384
Copy link

@dleitee this issue unable me to build the bundle using the create-react-app is strange though why this particular character can't be parsed.

@dleitee
Copy link
Owner

dleitee commented Jun 9, 2018

@sebas5384 have you got this message from create-react-app build?

$ react-scripts build
Creating an optimized production build...
Failed to compile.

Failed to minify the code from this file:

        ./node_modules/strman/lib/strman.js:6145

Read more here: http://bit.ly/2tRViJ9

error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

@dleitee
Copy link
Owner

dleitee commented Jun 9, 2018

I removed the htmlEncode and htmlDecode from strman local build and it's now working.

So, I'll check what's wrong with those methods.

@dleitee
Copy link
Owner

dleitee commented Jun 9, 2018

@sebas5384 @ocean

closed at #79 and on release v2.0.1

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

3 participants