-
Notifications
You must be signed in to change notification settings - Fork 128
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
Unable to precompile bower projects with source maps or gzip'ed files. #58
Comments
It also appears that excluding |
I can't tell if this is a bug or not, since AngularJS does not work with bower-rails out of the box. |
After researching I found that With the Invalid syntax: 1f8b (line: 1, col: 0, pos: 0)
Error
at new JS_Parse_Error (/tmp/execjs20140110-30355-1tmd7tc.js:2357:10748)
at js_error (/tmp/execjs20140110-30355-1tmd7tc.js:2357:10967)
at parse_error (/tmp/execjs20140110-30355-1tmd7tc.js:2357:12685)
at read_num (/tmp/execjs20140110-30355-1tmd7tc.js:2357:13284)
at Object.next_token [as input] (/tmp/execjs20140110-30355-1tmd7tc.js:2357:17547)
at next (/tmp/execjs20140110-30355-1tmd7tc.js:2357:19006)
at Object.parse (/tmp/execjs20140110-30355-1tmd7tc.js:2357:18795)
at print (/tmp/execjs20140110-30355-1tmd7tc.js:2630:26)
at /tmp/execjs20140110-30355-1tmd7tc.js:2670:14
at /tmp/execjs20140110-30355-1tmd7tc.js:1:92
(in /home/sergey/src/bower-rails-bug/vendor/assets/bower_components/angular/angular.min.js.gzip)/home/sergey/.rvm/gems/ruby-2.0.0-p247/gems/execjs-2.0.2/lib/execjs/external_runtime.rb:68:in `extract_result' After changing file extension from Actually after removing |
In the case of angular-resource bower package, the .gzip and .js.map files are not needed so added a workaround to tell sprockets to ignore these file extensions during pre-compilation. @SergeyKishenin, thanks for looking into it. |
We had similar issue with rails-assets. I ended up excluding .gzip files as well, and creating new issue on sprockets: sstephenson/sprockets#519 |
When running rake assets:precompile a project with source maps, bower-rails chokes.
After running
Everything compiles just fine.
See https://github.com/faun/bower-rails-bug for an example of this bug in action.
Here's a stack trace:
The text was updated successfully, but these errors were encountered: