learnyoureact icon indicating copy to clipboard operation
learnyoureact copied to clipboard

Cannot pass ISOMORPHIC (lesson 8)

Open sr6033 opened this issue 7 years ago • 12 comments

I cannot pass the ISOMORPHIC test even after using the official solutions. My dependencies are same as shown in your git repo.

screenshot from 2017-06-14 01-05-48

sr6033 avatar Jun 13 '17 19:06 sr6033

Issue is solved by installing the dependencies globally.

npm install -g browserify babelify babel-preset-react babel-preset-es2015

sr6033 avatar Jun 14 '17 07:06 sr6033

Hi @sr6033, thank you for reporting this issue and also for the solution you provided.

I actually tried to simulate your issue and ran into same problems. I haven't looked into deep yet but I tried also install the packages globally and it didn't solve the issue. I think it must be something with server side rendering coding.

Would you be able to provide more details how did you overcome the issue?

Thank you!

Dusan

DusanSacha avatar Jul 22 '17 17:07 DusanSacha

I will have to look into it again since it was long back. I will simulate the issue and check if the fix is working in my system and what are the steps. If the fix doesn't work, the issue will remain open.

sr6033 avatar Jul 23 '17 12:07 sr6033

Unfortunately I have the issue as well. The error is

var body = DOM.body; ^ TypeError: Cannot read property 'body' of undefined

Martialis39 avatar Oct 08 '17 12:10 Martialis39

Hey @Martialis39 ,

Oh man I was having this same problem for hours yesterday. Was so frustrating. I was looking through all these solutions and everything was almost working, but then would raise some other issue. I was going deeper and deeper into these rabbit holes all day yesterday and it was really putting me off continuing.

In the end, I went back to the previous exercise. I deleted anything to do with exercise 8 and went forwards from there. Then, once everything was working for exercise 7, I start 8 again. Everytime I changed any code, I ran 'node program.js 3000 Milk 13:00' (or just refreshed the page), to check it was still working. Then I could see exactly what went wrong, and was able to fix it immediately if there was ever a problem.

I would suggest trying that anyway. I'm just a beginner, so can't give you anymore detailed a solution than that.

Good Luck!

JakeH91 avatar Oct 10 '17 08:10 JakeH91

我也遇到了这样的问题 var body = DOM.body; ^

TypeError: Cannot read property 'body' of undefined 这个原因是是那么呢

好像是本地的ip地址修改了

noxbxx avatar Nov 26 '17 06:11 noxbxx

I have been having similar issues. From a high level point of view, I believe this exercise is outdated as React.DOM is now deprecated.

To actually get your program running, you can use React.createFactory(elementName) for each element defined.

E.g. var div = React.createFactory('div')

However, this does not pass when verifying the code.

afreeman123 avatar Jan 04 '18 15:01 afreeman123

I am also getting var body = DOM.body; ^ TypeError: Cannot read property 'body' of undefined

Which is frustrating since it seems like if we can't fix this, we can't do the rest of the workshop :(

zkbaum avatar Jun 02 '18 16:06 zkbaum

Try redoing from previous exercise and keep checking for errors in the page.

sr6033 avatar Jun 04 '18 06:06 sr6033

TypeError: Cannot read property 'body' of undefined

Is caused by react package out of date

cqcmdwym avatar Sep 18 '18 06:09 cqcmdwym

I am also getting var body = DOM.body; ^ TypeError: Cannot read property 'body' of undefined

Is there any update on this issue?

mjohnson518 avatar Jun 01 '19 11:06 mjohnson518

I'm just getting the screen flooded with:

(node:11374) TimeoutOverflowWarning: 4294967296000 does not fit into a 32-bit signed integer.
Timer duration was truncated to 2147483647.

... Until the thing eventually crashes with a connection error.

neutraali avatar Nov 14 '20 11:11 neutraali