When I do meteor run --production
I get the following error, but I am not sure if it is somewhere on my code or elsewhere. The code works fine without the --production
=> Errors prevented startup: While minifying app code: C:\Users\trajanar\AppData\Local\.meteor\packages\standard-minifier-js\1.0.5\p lugin.minifyStdJS.os\npm\node_modules\meteor\minifier-js\node_modules\uglify-js\ lib\parse.js:196:18: Unexpected token: name (modules) at new JS_Parse_Error (C:\Users\trajanar\AppData\Local\.meteor\packages\standard-minifier-js\1.0.5\ plugin.minifyStdJS.os\npm\node_modules\meteor\minifier-js\node_modules\uglify-js \lib\parse.js:196:18) at js_error (C:\Users\trajanar\AppData\Local\.meteor\packages\standard-minifier-js\1.0.5\ plugin.minifyStdJS.os\npm\node_modules\meteor\minifier-js\node_modules\uglify-js \lib\parse.js:204:11) at croak
Looking for further information, https://github.com/mishoo/UglifyJS2/issues/688 may indicate that the order may be wrong and babel wasn’t executed before uglify. I have ran my code through babel + es2015 preset, ng-annotate, uglify on gulp with no issues. So the problem may reside elsewhere.
For the time being though, I was able to get around the issue by doing a meteor remove standard-minifier-js
, from there I looked at the app.js
file to search for modules
but it wasn’t found in that file.