Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

When compiling to production I receive an error #6

Open
brooksdubois opened this issue Feb 7, 2018 · 2 comments
Open

When compiling to production I receive an error #6

brooksdubois opened this issue Feb 7, 2018 · 2 comments

Comments

@brooksdubois
Copy link

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
Copy link
Owner

munshkr commented Feb 15, 2018

@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
Copy link
Author

brooksdubois commented Feb 24, 2018

  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 maybe_assign (: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 simple_statement (: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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants