Open TransGirlCodes opened 9 years ago
There's multiple things going on here. There's some kind of problem unrelated to the solution you're using but it's being masked by another problem in learnyounode which I've proposed a fix for in #225. Basically something is failing during setup and it's jumping straight to cleanup but the cleanup is what's throwing that error. The actual problem could be something like not being able to listen on a specific port, or something even stranger.
So, you can wait till #225 gets merged if you want or persevere and see if you can figure out what's wrong on your system. I'd suggest starting with getting off Node 0.11.14, it's not supported or recommended. Either go back to 0.10.36, go up to 0.12.0 or switch to io.js.
Hi,
I've written the following answer to the exercise:
But when trying to run it with
Bens-MacBook-Pro:~ axolotlfan9250$ learnyounode run http.js /Users/axolotlfan9250/.nvm/v0.11.14/lib/node_modules/learnyounode/exercises/http_client/exercise.js:52 this.server.close(callback) ^ TypeError: Cannot read property 'close' of undefined at Exercise.learnyounode run http.js
I get:So I looked up the official solution, which includes waiting for an error event:
But this still does not help, the same output is returned. What is going wrong?
Thanks, Ben.