Exercise 5 console.log not returning anything.
See original GitHub issueAll 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:
- Created 8 years ago
- Reactions:6
- Comments:7 (1 by maintainers)
Top 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 >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
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 :])
Same issue: OSX 10.11.1, Node v0.12.7, Mongo v3.2.4, Learnyoumongo v3.0.1