learnyoureact icon indicating copy to clipboard operation
learnyoureact copied to clipboard

How to verify problem 8?

Open mgranados opened this issue 8 years ago • 23 comments

I see the HTML outputted is the right answer but by running learnyoureact verify I get the following error:
screen shot 2016-04-29 at 1 19 13 pm

mgranados avatar Apr 29 '16 18:04 mgranados

I'm getting this same issue too

theatlasroom avatar May 14 '16 05:05 theatlasroom

Same issue here to

konato avatar May 15 '16 14:05 konato

same issue!

koustuvsinha avatar Jun 11 '16 16:06 koustuvsinha

Same problem ! can anyone help ?

FukKwang avatar Jul 06 '16 16:07 FukKwang

+1

Sticksword avatar Jul 18 '16 06:07 Sticksword

Same issue. Even copy/pasted the solution files and got failed verification

jsdavis avatar Jul 19 '16 20:07 jsdavis

is still still happening? what are the solutions that failed verification? I've just completed the tutorial and have been able to verify properly.

a-metta avatar Jul 25 '16 07:07 a-metta

I copy pasted the same things as the solution repo and still had verification errors. I don't know why

Sticksword avatar Jul 26 '16 03:07 Sticksword

this is my package.json:

{ "name": "learnyoureact", "version": "1.0.0", "description": "", "main": "index.js", "scripts": { "test": "echo "Error: no test specified" && exit 1" }, "keywords": [], "author": "", "license": "ISC", "dependencies": { "babel": "^5.8.23", "body-parser": "^1.15.2", "express": "^4.14.0", "express-react-views": "^0.9.0", "react": "^0.14.8", "react-dom": "^0.14.8" } }

are the dependencies the same?

a-metta avatar Jul 26 '16 05:07 a-metta

Mine's this:

{
  "name": "learnyoureact",
  "version": "1.0.0",
  "description": "",
  "main": "index.js",
  "scripts": {
    "test": "echo \"Error: no test specified\" && exit 1"
  },
  "keywords": [],
  "author": "",
  "license": "ISC",
  "dependencies": {
    "babel": "^5.8.23",
    "babel-preset-es2015": "^6.9.0",
    "babel-preset-react": "^6.11.1",
    "babelify": "^7.3.0",
    "body-parser": "^1.15.2",
    "browserify": "^13.0.1",
    "express": "^4.14.0",
    "express-react-views": "^0.9.0",
    "react": "^15.2.1",
    "react-dom": "^15.2.1"
  }
}

It would seem the only difference is react and react-dom. Do you think that's the cause?

Sticksword avatar Jul 26 '16 07:07 Sticksword

+1. I'm getting the same error during verification as in the screenshot above. Knowing little about React, it does look like something caused by latest React version producing different HTML than the workshop expects.

rossb avatar Aug 13 '16 05:08 rossb

yes I would try to install that version that i have posted considering how react has been going through some major changes

a-metta avatar Aug 13 '16 05:08 a-metta

Just a quick note to say I resolved this problem by deleting my node_modules folder, replacing the dependencies list in my local package.json with the one from the repo itself then running npm install. The problem verifies OK after doing that.

rossb avatar Aug 13 '16 05:08 rossb

Funciona, borrando la carpeta de node_modules luego npm install como dice @rossb

xaca avatar Sep 01 '16 21:09 xaca

setting your package json to 0.14.0 for react and react-dom packages (effectively, removing the ~), also works. Maybe there should be a notice put on the read me about this?

BlessYAHU avatar Sep 10 '16 20:09 BlessYAHU

@rossb 's suggestion solves it. It was literally right in front of us lol! Thanks for the reality check, mate.

jedau avatar Oct 05 '16 14:10 jedau

I have a problem with this one, I managed to verify solution, code is being copied from solutions dir. But I see proper html file only after first page load and then when I reload or I try to navigate to /bundle.js I see this error in console:

events.js:160
      throw er; // Unhandled 'error' event
      ^

TypeError: Cannot read property 'error' of undefined (While processing preset: "/Users/jankowalski/projects/nodeschool/learnyoureact/node_modules/babel-preset-es2015/index.js") while parsing file: /Users/jankowalski/projects/nodeschool/learnyoureact/app.js

I use @rossb's dependencies

johnykov avatar Jan 21 '17 23:01 johnykov

@hanskoff I got the same pb as your's ... but following rossb's solution I got it right ... just verify after the first time and it should be ok (or if it's still out, go to next CSS2 and verify back)

krischamp avatar Jan 26 '17 19:01 krischamp

im getting the same error as @hanskoff

when I verify it works but when I run node program.js I get the error and can not load the page at localhost:3000

nharrisanalyst avatar Apr 03 '17 21:04 nharrisanalyst

@krischamp @nharrisanalyst Maybe #111 will be of some help.

kaz080 avatar Apr 10 '17 08:04 kaz080

Changing the following worked for me.

require('babel/register')({
    ignore: false
});

replace with:

require('babel/register');

dkonieczek avatar Jul 22 '17 19:07 dkonieczek

Hi,

I'm having an issue with learnyoureact Isomorphic exercise. I continue to get an error:

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

Can you assist? Thanks

mjohnson518 avatar Jun 01 '19 12:06 mjohnson518

@mjohnson518 Have you tried this: https://github.com/workshopper/learnyoureact/issues/103#issuecomment-239604351?

maxrumsey avatar Oct 20 '19 11:10 maxrumsey