I have a meteor application that uses the jsdom module. The application works correctly in development mode but when I run the command “meteor --production” or “meteor --build” the following error message appears :
=> Errors prevented startup:
While minifying app code:
/usr/root/.meteor/packages/standard-minifier-js/.1.0.7_1.je8mki++os+web.browser+web.cordova/plugin.minifyStdJS.os/npm/node_modules/meteor/minifier-js/node_modules/uglify-js/lib/parse.js:196:18:
Unexpected token: punc ())
at new JS_Parse_Error
(/usr/root/.meteor/packages/standard-minifier-js/.1.0.7_1.je8mki++os+web.browser+web.cordova/plugin.minifyStdJS.os/npm/node_modules/meteor/minifier-js/node_modules/uglify-js/lib/parse.js:196:18)
at js_error
(/usr/root/.meteor/packages/standard-minifier-js/.1.0.7_1.je8mki++os+web.browser+web.cordova/plugin.minifyStdJS.os/npm/node_modules/meteor/minifier-js/node_modules/uglify-js/lib/parse.js:204:11)
at croak
(/usr/root/.meteor/packages/standard-minifier-js/.1.0.7_1.je8mki++os+web.browser+web.cordova/plugin.minifyStdJS.os/npm/node_modules/meteor/minifier-js/node_modules/uglify-js/lib/parse.js:675:9)
at token_error
(/usr/root/.meteor/packages/standard-minifier-js/.1.0.7_1.je8mki++os+web.browser+web.cordova/plugin.minifyStdJS.os/npm/node_modules/meteor/minifier-js/node_modules/uglify-js/lib/parse.js:683:9)
at unexpected
(/usr/root/.meteor/packages/standard-minifier-js/.1.0.7_1.je8mki++os+web.browser+web.cordova/plugin.minifyStdJS.os/npm/node_modules/meteor/minifier-js/node_modules/uglify-js/lib/parse.js:689:9)
at expr_atom
(/usr/root/.meteor/packages/standard-minifier-js/.1.0.7_1.je8mki++os+web.browser+web.cordova/plugin.minifyStdJS.os/npm/node_modules/meteor/minifier-js/node_modules/uglify-js/lib/parse.js:1184:13)
at maybe_unary
(/usr/root/.meteor/packages/standard-minifier-js/.1.0.7_1.je8mki++os+web.browser+web.cordova/plugin.minifyStdJS.os/npm/node_modules/meteor/minifier-js/node_modules/uglify-js/lib/parse.js:1358:19)
at expr_ops
(/usr/root/.meteor/packages/standard-minifier-js/.1.0.7_1.je8mki++os+web.browser+web.cordova/plugin.minifyStdJS.os/npm/node_modules/meteor/minifier-js/node_modules/uglify-js/lib/parse.js:1393:24)
at maybe_conditional
(/usr/root/.meteor/packages/standard-minifier-js/.1.0.7_1.je8mki++os+web.browser+web.cordova/plugin.minifyStdJS.os/npm/node_modules/meteor/minifier-js/node_modules/uglify-js/lib/parse.js:1398:20)
at maybe_assign
(/usr/root/.meteor/packages/standard-minifier-js/.1.0.7_1.je8mki++os+web.browser+web.cordova/plugin.minifyStdJS.os/npm/node_modules/meteor/minifier-js/node_modules/uglify-js/lib/parse.js:1422:20)
=> Your application has errors. Waiting for file change.
If I remove the jsdom module, meteor generates the application (the error does not appear), but does not work correctly
I tested with earlier versions of jsdom and the problem persists.
Does anyone know how I can solve the problem?