Error in make min
Closed this issue · 5 comments
I get
Tracing dependencies for: swish
Uglify file: /home/mlunife/swish/web/js/swish-min.js.new
Error: Cannot uglify file: /home/mlunife/swish/web/js/swish-min.js.new. Skipping it. Error is:
SyntaxError: Unexpected token punc «(», expected punc «:» (line: 2627, col: 11, pos: 206155)
Error
at new JS_Parse_Error (/usr/local/lib/node_modules/requirejs/bin/r.js:15488:18)
at js_error (/usr/local/lib/node_modules/requirejs/bin/r.js:15496:11)
at croak (/usr/local/lib/node_modules/requirejs/bin/r.js:16035:9)
at token_error (/usr/local/lib/node_modules/requirejs/bin/r.js:16043:9)
at expect_token (/usr/local/lib/node_modules/requirejs/bin/r.js:16056:9)
at expect (/usr/local/lib/node_modules/requirejs/bin/r.js:16059:36)
at /usr/local/lib/node_modules/requirejs/bin/r.js:16632:13
at /usr/local/lib/node_modules/requirejs/bin/r.js:16082:24
at expr_atom (/usr/local/lib/node_modules/requirejs/bin/r.js:16562:35)
at maybe_unary (/usr/local/lib/node_modules/requirejs/bin/r.js:16738:19)
/home/mlunife/swish/web/js/swish-min.js.new
All I can say is that I just build the whole lot and it all works here. It should surely not try to minify the minified
file, but I guess you can only figure out what is wrong on your machine. Might be tool versions ...
Didn't read output carefully enough. I get the same error. It does seem to produce a working minified version. It seems we need to upgrade the JavaScript tools we are using. Bower is deprecated and the story around RequireJS is a bit unclear to me. Some advice and input is needed ...
Unfortunately I have very little experience in Javascript...
The folks at Bower seem to suggest Yarn as a viable replacement. I can set it up using this guide: https://itnext.io/bower-to-yarn-migration-simple-steps-2a5ad0c43281
FYI: more information on the landscape of JS package managers https://stackoverflow.com/questions/35062852/npm-vs-bower-vs-browserify-vs-gulp-vs-grunt-vs-webpack
Merged. Closing.