Comments (7)
looks like you might have a stale process running in the background, try killall node
and try again. Also sudo npm install learnyounode -g
to get the latest, I just published a new version that has an auto-kill thing in it that should (hopefully) stop this kind of thing.
from learnyounode.
I have no other node processes running and I rerun the npm install learnyounode -g
and tried again, still with no success. Running in windows 7 if that makes any difference
from learnyounode.
I also seem to have the same Issue with the Juggling-async solution
from learnyounode.
I Think it may be an issue with the network proxy as I had the same issue running the following myself
http.get('http://www.google.com/index.html', function(res) {
console.log("Got response: " + res.statusCode);
}).on('error', function(e) {
console.log("Got error: " + e.message);
});
I had to change the above to the following where our company proxy is http://http.proxy.somewhere.com:1234
:
http.get({ host: 'http.proxy.somewhere.com', path:'http://www.google.com/index.html', port: 1234}, function(res) {
console.log("Got response: " + res.statusCode);
}).on('error', function(e) {
console.log("Got error: " + e.message);
});
I realise this is probably not a bug, at least not with learnyounode (possibly more so with Node itself) but how might I get around it
from learnyounode.
Hi @jonniedarko,
It would not be a proxy issue as its not calling out anywhere when verifying.
The solution.js requires the npm module bl
, which may not have been installed. When I try to run the solution without first installing bl
, I get the same failure you describe above. After I install it, great success!
Try npm install bl
in the same directory and verify again. This step is described nicely in the problem description for http collect.
You may run into issues with npm if you're behind a proxy. Run this command to set the proxy for npm:
npm config set proxy http://username:[email protected]:80
from learnyounode.
Hi @Flet , looks like that was the Issue, I was pretty sure that I had installed bl globally thought, so not sure why that didn't work but I tried it with a local install and it solved my problem
from learnyounode.
You try:
var http = require('http')
var bl = require('bl')
http.get(process.argv[2], function (response) {
response.pipe(bl(function (err, data) {
if (err)
return console.error(err)
data = data.toString()
console.log(data.length)
console.log(data)
}))
})
from learnyounode.
Related Issues (20)
- Got error while running npm install -g learnyounode HOT 1
- Publish a new major version HOT 6
- standard-version Tooling HOT 3
- Restore offline docs, updated for latest Node HOT 3
- Suggest filenames for students to use HOT 1
- Why one works and other doesn't work to async juggling? HOT 1
- Make It Modular Verification Issue HOT 4
- Make it Modular: Issue when using named imports for `fs` HOT 1
- HTTP JSON API SERVER (Exercise 13 of 13) verify error HOT 3
- Path isues HOT 3
- Exercise 4 Correct Answer, still fail? HOT 2
- Understanding Exercise 9 problem!
- version published in npm HOT 1
- juggling async issue HOT 2
- Add german translation HOT 2
- Test Doesn't Recognize Syntactically Different Idiomatic 'Error First' Pattern on 'Make It Modular' HOT 1
- Exercise 12 - "end" and "close" events for http.IncomingMessage are never triggered HOT 1
- module installation HOT 4
- In time-server exercise correct solution will not pass.
- ES modules
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from learnyounode.