Hi, guys!
Few hours ago after another deploy to Heroku with no essential changes I got error:
ERROR when compiling base_js_code! See file tmp/base_js_code.js to correlate line numbers of error. Error is
2016-06-11T00:19:30.146600+00:00 app[web.1]:
2016-06-11T00:19:30.146601+00:00 app[web.1]: ReferenceError: clearTimeout is not defined
Full stack here http://pastebin.com/LYgpRxZa
I tried to find base_js_code.js, but there is no such file in tmp. If I turn off prerender feature everything is deploying and working on heroku as it was just one day ago. I compared versions of gems and npm packages - no any visible differences between successful and not successful deploys. I searched for clearTimeout string - no any occurrences in my project only in node_modules directory. The problem is this error happens only on Heroku servers. Locally everything is working with pretender as well as without. But If I put clearTimeout call into any of my react component - I got the same error locally.
May be there is a way to define this bloody clearTimeout only for server prerender environment?
Completely stacked..
Any ideas what to do?
@martyphee is also seeing this. This will take some investigative work.
If this is during server rendering, we should polyfill this, as we do here:
https://medium.com/@railsonmaui/homeway-and-introducing-friends-and-guests-d4d365c6ad8d#.v8ttay83d
If this is during deployment and asset compilation, I really don't know.
@martyphee @ramusus Please let us know what you find and if you have a fix, please submit a PR.
This is happening only after deployment. I wasn't able to reproduce it locally. Only on the server.
Hey guys, seeing the same thing since yesterday. No changes in npm and gem packages.
2016-06-11T09:12:23.479339+00:00 app[web.1]: ERROR when compiling base_js_code! See file tmp/base_js_code.js to correlate line numbers of error. Error is
2016-06-11T09:12:23.479360+00:00 app[web.1]: ReferenceError: clearTimeout is not defined
2016-06-11T09:12:23.479361+00:00 app[web.1]:
2016-06-11T09:12:23.479361+00:00 app[web.1]: Object.<anonymous> ((execjs):8015:27)
2016-06-11T09:12:23.479362+00:00 app[web.1]: __webpack_require__ ((execjs):51:30)
2016-06-11T09:12:23.479363+00:00 app[web.1]: Object.<anonymous> ((execjs):8003:78)
2016-06-11T09:12:23.479364+00:00 app[web.1]: __webpack_require__ ((execjs):51:30)
2016-06-11T09:12:23.479364+00:00 app[web.1]: Object.<anonymous> ((execjs):92:2)
2016-06-11T09:12:23.479366+00:00 app[web.1]: __webpack_require__ ((execjs):51:30)
2016-06-11T09:12:23.479367+00:00 app[web.1]: __webpack_require__ ((execjs):51:30)
2016-06-11T09:12:23.479368+00:00 app[web.1]: (execjs):71:18
I'd really like to find out what caused this. We can't have this happening since we deploy 10-20 times a day to production. Something minor had to be changed.
I think I just duplicated it locally!!!!

It's some shim. Need to find where it's coming from. process/browser.js. @justin808 bable-pollyfill. 296 is the webpack number.
__webpack_require__(296);
/* eslint max-len: 0 */
if (global._babelPolyfill) {
throw new Error("only one instance of babel-polyfill is allowed");
}

We just need to polyfill to it probably.
Hi guys, i'm having the same problem and i found that is due by process npm package
Here the issue
https://github.com/defunctzombie/node-process/issues/60
reverting back to 0.11.3 version worked well.
Confirmed, after I put [email protected] into package.json, deploy to Heroku with prerender enabled started to be successful.
A little update,
process developers released an update that fix the bug. Also version 6.0.4 of react on rails works too
Great! Closing this issue! Thanks for quick support!
Works for us too. Thanks!
On Tue, Jun 14, 2016 at 7:49 PM Boris Shifrin [email protected]
wrote:
Great! Closing this issue! Thanks for quick support!
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/shakacode/react_on_rails/issues/449#issuecomment-225857672,
or mute the thread
https://github.com/notifications/unsubscribe/ABnmZHbxboCH-qiG2leznJZCIHAQJvUwks5qLpU_gaJpZM4Izbez
.