munshkr / ejs-brunch

Adds EJS template compilation support to Brunch
4 stars 4 forks source link

When compiling to production I receive an error #6

Open brooksdubois opened 6 years ago

brooksdubois commented 6 years ago

19:58:41 - error: Optimizing of public/app.js failed. L10776:21 SyntaxError: Unexpected token: operator (>)

Everything works normally, just build fails when compiling to production.

I am using coffescript +ejs + jquery. Also, using uglify to minimize for production.

here is my config: { "dependencies": { "ejs-brunch": "^1.0.2", "jquery": "^3.3.1" }, "devDependencies": { "auto-reload-brunch": "^2.7.1", "brunch": "^2", "clean-css-brunch": "^2.10.0", "coffee-script-brunch": "^2.10.2", "stylus-brunch": "^2.10.0", "uglify-js-brunch": "^2.10.0" } }

munshkr commented 6 years ago

@brooksdubois Could you try this again? I've just merged a PR that replaces arrow functions to make it compatible with ES5, maybe that was the problem.

brooksdubois commented 6 years ago
  1. started the watch server,
  2. npm install --save ejs-brunch --update appears normal
  3. kill the watch server
  4. brunch build --production --I set the logging on --I hope its useful. looks like its a problem with ugliy. If I take the ejs files out everything works normally. could be on their end. if so, sorry to bother you

Output:

Brooks:paperfrisbee brooksdubois$ brunch build --production 22:01:42 - error: Optimizing of public/app.js failed. L10774:21 SyntaxError: Unexpected token: operator (>) at new JS_Parse_Error (:1534:18) at js_error (:1542:11) at croak (:2089:9) at token_error (:2097:9) at unexpected (:2103:9) at expr_atom (:2630:9) at maybe_unary (:2792:19) at expr_ops (:2827:24) at maybe_conditional (:2832:20) at maybe_assign (:2856:20) at maybeassign (:2864:32) at expression (:2875:20) at vardefs (:2509:56) at var (:2522:27) at eval (:2265:30) at eval (:2136:24) at block (:2429:20) at eval (:2401:25) at function (:2407:15) at expr_atom (:2622:24) at maybe_unary (:2792:19) at expr_ops (:2827:24) at maybe_conditional (:2832:20) at maybe_assign (:2856:20) at expression (:2875:20) at expr_list (:2641:24) at subscripts (:2775:30) at subscripts (:2752:20) at expr_atom (:2628:20) at maybe_unary (:2792:19) at expr_ops (:2827:24) at maybe_conditional (:2832:20) at maybe_assign (:2856:20) at expression (:2875:20) at simplestatement (:2314:55) at eval (:2183:19) at eval (:2136:24) at block (:2429:20) at eval (:2401:25) at function_ (:2407:15) at expr_atom (:2622:24) at maybe_unary (:2792:19) at expr_ops (:2827:24) at maybe_conditional (:2832:20) at maybe_assign (:2856:20) at expression (:2875:20) at expr_atom (:2608:26) at maybe_unary (:2792:19) at expr_ops (:2827:24) at maybe_conditional (:2832:20) at maybe_assign (:2856:20) at expression (:2875:20) at simple_statement (:2314:55) at eval (:2195:24) at eval (:2136:24) at eval (:2904:23) at Object.parse (:2915:7) at /Users/brooksdubois/Documents/workspace/PFBrunch/paperfrisbee/node_modules/uglify-js/tools/node.js:71:33 at Array.forEach (:null:null) at Object.exports.minify (/Users/brooksdubois/Documents/workspace/PFBrunch/paperfrisbee/node_modules/uglify-js/tools/node.js:66:15) at UglifyJSOptimizer.optimize (/Users/brooksdubois/Documents/workspace/PFBrunch/paperfrisbee/node_modules/uglify-js-brunch/index.js:45:32) at :null:null