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

Conflict with Uglify JS? #19

Closed
NiQ-B opened this issue Feb 22, 2016 · 1 comment
Closed

Conflict with Uglify JS? #19

NiQ-B opened this issue Feb 22, 2016 · 1 comment

Comments

@NiQ-B
Copy link

NiQ-B commented Feb 22, 2016

Getting the following error with broccoli-serviceworker on 0.0.8 & 0.0.9. Fell back to version 0.0.7 and all builds fine. Minimum research stated that Unexpected token: punc() was related to uglify.js

Fairly green to serviceworkers but got them working manually in ember but would really like to set it and for get it using a tool :-D. At least for the boilerplate.

I am using broccoli-static-compiler could be the conflict also.

Not sure where to start troubleshooting this error, here is the line in the service-worker.js

BroccoliServiceWorker.prototype.write = function(readTree, destDir) {

ember s --proxy http://0.0.0.0:3000 --environment=production
version: 2.3.0
Proxying to http://0.0.0.0:3000
Livereload server on http://localhost:49154
Serving on http://localhost:4200/
File: service-worker.js (43:13)
Unexpected token: punc ())
Error
at new JS_Parse_Error (:1508:18)
at js_error (:1516:11)
at croak (:2008:9)
at token_error (:2016:9)
at unexpected (:2022:9)
at expr_atom (:2517:13)
at maybe_unary (:2691:19)
at expr_ops (:2726:24)
at maybe_conditional (:2731:20)
at maybe_assign (:2755:20)
at expression (:2774:20)
at expr_atom (:2507:26)
at maybe_unary (:2691:19)
at expr_ops (:2726:24)
at maybe_conditional (:2731:20)
at maybe_assign (:2755:20)
at expression (:2774:20)
at expr_list (:2540:24)
at subscripts (:2674:30)
at subscripts (:2651:20)
at subscripts (:2671:20)
at subscripts (:2651:20)
at subscripts (:2671:20)
at subscripts (:2651:20)
at expr_atom (:2527:20)
at maybe_unary (:2691:19)
at expr_ops (:2726:24)
at maybe_conditional (:2731:20)
at maybe_assign (:2755:20)
at expression (:2774:20)
at expr_list (:2540:24)
at subscripts (:2674:30)
at subscripts (:2651:20)
at expr_atom (:2527:20)
at maybe_unary (:2691:19)
at expr_ops (:2726:24)
at maybe_conditional (:2731:20)
at maybe_assign (:2755:20)
at expression (:2774:20)
at simple_statement (:2222:55)
at eval (:2095:19)
at eval (:2055:24)
at block_ (:2335:20)
at eval (:2308:25)
at function_ (:2313:15)
at expr_atom (:2521:24)
at maybe_unary (:2691:19)
at expr_ops (:2726:24)
at maybe_conditional (:2731:20)
at maybe_assign (:2755:20)
at expression (:2774:20)
at expr_list (:2540:24)
at subscripts (:2674:30)
at subscripts (:2651:20)
at expr_atom (:2527:20)
at maybe_unary (:2691:19)
at expr_ops (:2726:24)
at maybe_conditional (:2731:20)
at maybe_assign (:2755:20)
at expression (:2774:20)
at simple_statement (:2222:55)
at eval (:2095:19)
at eval (:2055:24)
at eval (:2802:23)
at Object.parse (:2812:7)
at /Users/<%home_directory%>/App/src/App-Platform/client/common/App-common/node_modules/broccoli-uglify-sourcemap/node_modules/uglify-js/tools/node.js:62:33
at Array.forEach (native)
at Object.exports.minify (/Users/<%home_directory%>/App/src/App-Platform/client/common/App-common/node_modules/broccoli-uglify-sourcemap/node_modules/uglify-js/tools/node.js:57:15)
at UglifyWriter.processFile (/Users/<%home_directory%>/App/src/App-Platform/client/common/App-common/node_modules/broccoli-uglify-sourcemap/index.js:118:27)
at /Users/<%home_directory%>/App/src/App-Platform/client/common/App-common/node_modules/broccoli-uglify-sourcemap/index.js:62:16
at Array.forEach (native)
at /Users/<%home_directory%>/App/src/App-Platform/client/common/App-common/node_modules/broccoli-uglify-sourcemap/index.js:52:21
at lib$rsvp$$internal$$tryCatch (/Users/<%home_directory%>/App/src/App-Platform/client/common/App-common/node_modules/rsvp/dist/rsvp.js:1036:16)
at lib$rsvp$$internal$$invokeCallback (/Users/<%home_directory%>/App/src/App-Platform/client/common/App-common/node_modules/rsvp/dist/rsvp.js:1048:17)
at lib$rsvp$$internal$$publish (/Users/<%home_directory%>/App/src/App-Platform/client/common/App-common/node_modules/rsvp/dist/rsvp.js:1019:11)
at lib$rsvp$asap$$flush (/Users/<%home_directory%>/App/src/App-Platform/client/common/App-common/node_modules/rsvp/dist/rsvp.js:1198:9)
at nextTickCallbackWith0Args (node.js:452:9)
at process._tickCallback (node.js:381:13)

@pete-the-pete
Copy link

I had the same issue, upgrading to ember-cli 2.40 solved it for me.

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