nickponline
nickponline

Reputation: 25914

Error bundling Meteor application?

When I try and bundle my Meteor application I get:

$ meteor bundle app.tgz
Errors prevented bundling:
Exception while bundling application:
Error
    at new JS_Parse_Error (/usr/local/meteor/lib/node_modules/uglify-js/lib/parse-js.js:263:18)
    at js_error (/usr/local/meteor/lib/node_modules/uglify-js/lib/parse-js.js:271:11)
    at croak (/usr/local/meteor/lib/node_modules/uglify-js/lib/parse-js.js:733:9)
    at token_error (/usr/local/meteor/lib/node_modules/uglify-js/lib/parse-js.js:740:9)
    at unexpected (/usr/local/meteor/lib/node_modules/uglify-js/lib/parse-js.js:746:9)
    at /usr/local/meteor/lib/node_modules/uglify-js/lib/parse-js.js:1124:9
    at maybe_unary (/usr/local/meteor/lib/node_modules/uglify-js/lib/parse-js.js:1209:19)
    at expr_ops (/usr/local/meteor/lib/node_modules/uglify-js/lib/parse-js.js:1236:24)
    at maybe_conditional (/usr/local/meteor/lib/node_modules/uglify-js/lib/parse-js.js:1240:20)
    at maybe_assign (/usr/local/meteor/lib/node_modules/uglify-js/lib/parse-js.js:1264:20)

The application works fine locally, and I can't understand what is wrong from the error message. Not even sure which file to start looking for the problem in?

Upvotes: 3

Views: 1055

Answers (2)

LiorST
LiorST

Reputation: 51

Make sure you don't currently have any directories, that you don't want to include, inside your project's dir, like for example a previous bundle/ directory. This will definitely cause the JS_Parse_error when bundling, but will not prevent you from running your app through meteor run or mrt - Such a simple mistake, but might cost you precious hours to figure out.

Upvotes: 0

Rahul
Rahul

Reputation: 12231

Meteor is trying to minify your javascript and the internal parser used by uglifyjs is encountering an error. Are you sure your javascript is free of syntax errors? Are the semi-colons all in the right places? Do you get any console errors in the browser?

Also, please specify which version of Meteor you're using.

Upvotes: 2

Related Questions