question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Exercise 5 console.log not returning anything.

See original GitHub issue

All console.log calls in exercise 5 using learnyoumongo run [filename] don’t return anything. This might be by design, but I can’t debug anything using this. I’m on OSX 10.11, using Node v5.6.0, Mongo v3.0.7 and Learnyoumongo v3.0.1 EDIT It’s not a platform-specific thing, it also fails on Ubuntu 14.04.4 with Node v4.4.0, Mongo v2.4.9, and learnyoumongo v3.0.1

My code:

console.log(process.argv);
MongoClient = require('mongodb').MongoClient;
console.log(MongoClient);

Output:

Crispin-laptop:mongo crispin$ learnyoumongo run insert.js
Crispin-laptop:mongo crispin$

Issue Analytics

  • State:closed
  • Created 8 years ago
  • Reactions:6
  • Comments:7 (1 by maintainers)

github_iconTop GitHub Comments

5reactions
evanlucascommented, May 19, 2016

Yes, this exercise purposefully compares stdout of both your script and one executing the expected way. Closing as this is by design. (If you have a better way of doing this, I am all ears :])

3reactions
SergioEnriquecommented, Mar 20, 2016

Same issue: OSX 10.11.1, Node v0.12.7, Mongo v3.2.4, Learnyoumongo v3.0.1

Read more comments on GitHub >

github_iconTop Results From Across the Web

Console.log not working at all - Stack Overflow
log () isn't logging any results in Chrome Dev tools, am I doing it correctly? $(window).scroll(function() { $('section').each ...
Read more >
console.log and return - Codecademy
It seems you can only use return in a function to call the value of whatever you pass into the function. Where as...
Read more >
JavaScript console.log() Method - W3Schools
The log() method writes (logs) a message to the console. The log() method is useful for testing purposes. Note. When testing console methods,...
Read more >
Learning JavaScript functions and how you should use them
When you run this program, it doesn't log anything since add doesn't call console.log or any other output methods. However, the function does...
Read more >
The 10 Most Common JavaScript Issues Developers Face
If you need help figuring out why your JavaScript isn't working, consult this list of the 10 most common JavaScript issues from a...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found