-
-
Notifications
You must be signed in to change notification settings - Fork 252
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
ExecJS::ProgramError: Unexpected token: punc (:) due to ember-data.js.map #428
Comments
Are there any workarounds for this? @ur5us what version of rails are you using? |
@rgrinberg I'm currently on 3.2.21. I think the problem might be that the asset pipeline tries to compile the map (TBC). |
I changed the way to manage bundled files #448. I think it will fix this issue. |
@tricknotes I've upgraded us to [email protected] but the error still happens. It doesn't matter whether the file is copied or not. What matters is that it's in the Sprockets path which it seems to be. Thus, I'm using the following solution: /cc @rgrinberg
Rack::Mime::MIME_TYPES.merge!({".map" => "text/plain"}) Further details here: jimsynz/faye-rails#15 (comment). |
@tricknotes I'm not entirely sure whether this is a problem with ember-rails, Rails (asset pipeline), Sprockets or even something else. I'm happy to close this issue but add a note to the docs. |
thank you @tricknotes , adding MIME_TYPES worked for me, i'm using [email protected] |
Fix: Remove this file from the asset pipeline, because it is not valid JavaScript. Add Stuff like this to your application.rb module App |
Modifying the default rails definition for assets.precompile in production.rb did it for me:
I also had a separate manifest for my ember app so it looked like this:
Found that answer here: http://stackoverflow.com/a/10099659 However, note that my asset precompilation took forever on Heroku and I noticed that things were being precompiled more than once. So there might be some issue with this workaround. |
I had the same problem when I've deployed to heroku. I've changed the syntax in my code from:
I'm actually a noob with Ember and I didn't want to change many things in my rails config. It's worth saying the ember code in my application is small. Later I found the same solution here: http://stackoverflow.com/a/32534114/642496 My question: Is this a valid/good solution? Is there a negative impact on app performance or for me as developer? Thanks! |
I hit this problem and have tried all the above work arounds with no luck. What's worse is I'm not even using ember data. Can ember-data be removed somehow?? |
@hernanvicente It's the same. The former is ES6 syntax, the latter E3/5. It looks like it's related to the @baraka2000 It's hard to tell without further details but the following might help (still using my solution above and assuming your issue happens in dev mode?): # make sure you stop your rails server, especially if you're using spring app preloader, then
bundle exec rake tmp:cache:clear In your Gemfile, you might try the following: gem 'ember-rails'
gem 'ember-data-source', require: false Start your server and try again. |
After upgrading to version
0.16.1
the build consistently fails, that is, I'm not able to runbundle exec rake assets:precompile
successfully. Here's the stack trace which suggests that there is an issue withember-data.js.map
:Even more annoyingly I can't just downgrade the gem via specifying version
0.16.0
in the Gemfile, at least not until I manually executerm -rf tmp/ember-rails/
.Potentially related: #343 #357
The text was updated successfully, but these errors were encountered: