workshopper / learnyoureact

Let's learn React.js and server side rendering!
MIT License
535 stars 142 forks source link

Cannot pass ISOMORPHIC (lesson 8) #127

Open sr6033 opened 7 years ago

sr6033 commented 7 years ago

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 commented 7 years ago

Issue is solved by installing the dependencies globally.

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

DusanSacha commented 7 years ago

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

sr6033 commented 7 years ago

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.

Martialis39 commented 6 years ago

Unfortunately I have the issue as well. The error is

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

JakeH91 commented 6 years ago

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!

noxbxx commented 6 years ago

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

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

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

afreeman123 commented 6 years ago

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.

zkbaum commented 6 years ago

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 :(

sr6033 commented 6 years ago

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

cqcmdwym commented 6 years ago

TypeError: Cannot read property 'body' of undefined

Is caused by react package out of date

mjohnson518 commented 5 years ago

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

Is there any update on this issue?

neutraali commented 3 years ago

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.