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

Uncaught ReferenceError: e is not defined #200

Closed
cshah3 opened this issue Apr 24, 2017 · 8 comments
Closed

Uncaught ReferenceError: e is not defined #200

cshah3 opened this issue Apr 24, 2017 · 8 comments

Comments

@cshah3
Copy link

cshah3 commented Apr 24, 2017

The package works perfectly in a local dev environment but when I deploy to Heroku, I get the following error:
Uncaught ReferenceError: e is not defined

Here is the full stack trace:
33../support/isBuffer @ blob:https://app.herokuapp.com/ff936ac0-6d3f-4861-be69-5014291c6119:2 i @ blob:https://app.herokuapp.com/ff936ac0-6d3f-4861-be69-5014291c6119:1 (anonymous) @ blob:https://app.herokuapp.com/ff936ac0-6d3f-4861-be69-5014291c6119:1 104.util @ blob:https://app.herokuapp.com/ff936ac0-6d3f-4861-be69-5014291c6119:5 i @ blob:https://app.herokuapp.com/ff936ac0-6d3f-4861-be69-5014291c6119:1 (anonymous) @ blob:https://app.herokuapp.com/ff936ac0-6d3f-4861-be69-5014291c6119:1 131.../error/validation_error @ blob:https://app.herokuapp.com/ff936ac0-6d3f-4861-be69-5014291c6119:6 i @ blob:https://app.herokuapp.com/ff936ac0-6d3f-4861-be69-5014291c6119:1 (anonymous) @ blob:https://app.herokuapp.com/ff936ac0-6d3f-4861-be69-5014291c6119:1 145../reference/latest @ blob:https://app.herokuapp.com/ff936ac0-6d3f-4861-be69-5014291c6119:6 i @ blob:https://app.herokuapp.com/ff936ac0-6d3f-4861-be69-5014291c6119:1 (anonymous) @ blob:https://app.herokuapp.com/ff936ac0-6d3f-4861-be69-5014291c6119:1 159.../style-spec/validate_style.min @ blob:https://app.herokuapp.com/ff936ac0-6d3f-4861-be69-5014291c6119:7 i @ blob:https://app.herokuapp.com/ff936ac0-6d3f-4861-be69-5014291c6119:1 (anonymous) @ blob:https://app.herokuapp.com/ff936ac0-6d3f-4861-be69-5014291c6119:1 151.../style-spec/reference/latest @ blob:https://app.herokuapp.com/ff936ac0-6d3f-4861-be69-5014291c6119:6 i @ blob:https://app.herokuapp.com/ff936ac0-6d3f-4861-be69-5014291c6119:1 (anonymous) @ blob:https://app.herokuapp.com/ff936ac0-6d3f-4861-be69-5014291c6119:1 157.../style-spec/feature_filter @ blob:https://app.herokuapp.com/ff936ac0-6d3f-4861-be69-5014291c6119:6 i @ blob:https://app.herokuapp.com/ff936ac0-6d3f-4861-be69-5014291c6119:1 (anonymous) @ blob:https://app.herokuapp.com/ff936ac0-6d3f-4861-be69-5014291c6119:1 100.../style/style_layer_index @ blob:https://app.herokuapp.com/ff936ac0-6d3f-4861-be69-5014291c6119:4 i @ blob:https://app.herokuapp.com/ff936ac0-6d3f-4861-be69-5014291c6119:1 (anonymous) @ blob:https://app.herokuapp.com/ff936ac0-6d3f-4861-be69-5014291c6119:1 anonymous @ blob:https://app.herokuapp.com/ff936ac0-6d3f-4861-be69-5014291c6119:10 i @ blob:https://app.herokuapp.com/ff936ac0-6d3f-4861-be69-5014291c6119:1 e @ blob:https://app.herokuapp.com/ff936ac0-6d3f-4861-be69-5014291c6119:1 (anonymous) @ blob:https://app.herokuapp.com/ff936ac0-6d3f-4861-be69-5014291c6119:1

@cshah3
Copy link
Author

cshah3 commented Apr 24, 2017

It was an issue with v2.0.0 of standard-minifier-js and probably UglifyJS2. Downgrading to v1.2.3 solves this issue for now.

@cshah3 cshah3 closed this as completed Apr 24, 2017
@mario-jerkovic
Copy link

Can you be more specific on how have you resolved this issue

@cshah3
Copy link
Author

cshah3 commented Apr 28, 2017

@mario-jerkovic I am using this library in a Meteor app. I downgraded my standard-minifier-js meteor package to v1.2.3 to resolve the issue.

@mario-jerkovic
Copy link

@cshah3 Thanks.. I am having the same issue with React app, but cannot get around it

@andrea689
Copy link

@mario-jerkovic Did you find a solution? Thanks!

@mario-jerkovic
Copy link

@andrea689
After a lot of debugging I have figure out that UglifyJsPlugin was causing this error to occur, so I have removed new webpack.optimize.AggressiveMergingPlugin() and set UglifyJsPlugin like this:
new webpack.optimize.UglifyJsPlugin({ compress: false })

@taystu
Copy link

taystu commented Mar 2, 2018

Hi @mario-jerkovic I'm still getting this issue did you make any more changes to your webpack build? Also mind sharing your versions of react-mapbox-gl and webpack?

Thanks

@Wykks
Copy link
Contributor

Wykks commented Mar 3, 2018

@taystu It an known issue with mapbox-gl and Uglify.
You have a detailed explanation of the issue here: mapbox/mapbox-gl-js#4359 (comment)
And here: mishoo/UglifyJS#2520 (comment)

And a correct way to solve it: angular/angular-cli#7931 (comment)

To sum it up, just set typeofs : false to Uglify options.

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

5 participants