Cannot declare a let variable twice: 'e'


Error: SyntaxError: Cannot declare a let variable twice: 'e'.

Affected Versions: iOS 10.3, 10.1 devices/simulators

Meteor version: 1.5.0


Cordova plugins:


Summary: I originally replaced the standard-minifier-* packages with the abernixs fork and that resolved my meteor build issues when building/deploying for production. However my production builds for iOS devices started to be affected recently. I kept getting the error above on iOS 10 devices. I’m presuming there is a missing version lock on minify somewhere.

Solution: After some searching this thread provided the solution. You can pass options into minify. So as suggested I flipped safari10 to true in minify.js and that cleared up my problem with iOS 10 production builds!

Here is where I made this hacky change and looking for suggestions on making a cleaner solution for myself.



In both files there is

if (options.mangle) {
            options.mangle = defaults(options.mangle, {
                cache: null,
                eval: false,
                ie8: false,
                keep_classnames: false,
                keep_fnames: false,
                properties: false,
                reserved: [],
                safari10: true,
                toplevel: false,
            }, true);

I flipped safari 10 to true in both files. So my question, whats a cleaner solution to this? This works for now but eventually these files could be deleted since they’re in my .meteor. So far I have found that in the next Meteor release uglify-es will be bumped up in version.


I am having similar problems when on Android Kitkat 19. It however seems to work on other versions or no problem reported yet. Removing standard-minifier.js seems to remove the problem.