Jsdom problem in production mode

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?

Do you mean the npm based jsdom package? If so, which version are you using? The latest versions of the jsdom package won’t work with Meteor 1.3.x as they require Node 4 or higher.

Thank you for answering.

I have meteor 1.3.4.1. I’ve tried several versions of jsdom: 6.5.1, 7.0.0, the latest in npm and version jsdom@3 and all gave me the same error when minifiying. What version are you using ?.
All versions work in development mode. I have the problem, only, when I try meteor --production or meteor --build to build the application to run in nodejs (v.4).