-
Notifications
You must be signed in to change notification settings - Fork 754
ActionView::Template::Error (ReferenceError: Map is not defined) #853
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
Comments
Can you upgrade from v1.5 to v1.11 first to make the leap smaller and isolate which change is making your upgrade hard, then upgrade minor versions until you find your breaking change? Map is an ES6 method in Javascript. If you can't run something due to ES6 Map not defined then likely there is something wrong with how it's converting ES6 to ES5. Debugging other people's closed source is like fishing in the dark for me so I'm going to need more information than that to help you. Let me know how it goes! Edit: Yep you must be using sprockets as v1.5 didn't have Webpacker support yet. |
@BookOfGreg thanks for your reply. |
You don't have to only use ES6, we prefer ES6 to ES5 but in general ES5 is more compatible with things. Now I think about it, if you're using We dropped therubyracer support a few versions back. |
@oiahoon I had this issue, resolved it by adding babel-polyfill. Step 1: download https://npm-cdn.herokuapp.com/[email protected]/dist/polyfill.min.js (per https://babeljs.io/docs/usage/polyfill/), put it in Step 2: add to
|
@p-salido that's interesting. I didn't need that module in order to use ES6 in my company's project, I may spend some time seeing why that happens in the new year. |
Depends on your browser. Recent Chromes include the Map part of es6 apparently. For me poltergeist was failing without babel-polyfill. |
@p-salido i tried to add that
|
It looks like there are links to the code being compiled in your screenshot, click on them to find out what statement is failing and in which context. |
ok guys, while I'm giving up server render, and change the assets loads order(via. ISSUE-742 ), then run |
Uh oh!
There was an error while loading. Please reload this page.
Actual behavior
while try to update
react-rails
from1.5
to2.3.4
,it seems there is a big change, i've no idea how to fix these problems.
I don't think i am the only person.
System configuration
Sprockets or Webpacker version: i just don't know how to check this
React-Rails version:
2.3.4
Rect_UJS version: i just don't know how to check this
Rails version:
5.1.4
Ruby version:
ruby 2.3.3p222 (2016-11-21 revision 56859) [x86_64-linux]
Since I user
docker-compose
,Dockerfile:
FROM rails:onbuild
rails
to5.1.4
react-rails
to2.3.4
bundle install
application.rb
as you mentionedrails g react:install
prerender: true
to my componetweb-console
,maybe some help:The text was updated successfully, but these errors were encountered: