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.

console.log not called in server.start callback

See original GitHub issue

This issue appears with the switch from 0.9.0 to 1.0.0

I’m using graphcool beta and my server is defined in index.js which looks like this:

server.start(() => console.log("Server is running on http://localhost:4000"));

with graphql-yoga 0.9.0, I call yarn start and it prints the message as expected. In 1.0.0 it does nothing, which looks scary, like my server didn’t start, but it did.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:5 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
kbrandwijkcommented, Jan 6, 2018

I agree both syntax options should work. This should and can be fixed in start(), checking if the first parameter is a function.

0reactions
schicklingcommented, Jan 6, 2018

Both syntax options should be supported. This rather looks like a bug to me. @kbrandwijk what are your thoughts?

Read more comments on GitHub >

github_iconTop Results From Across the Web

console.log not called in server.start callback · Issue #88
I'm using graphcool beta and my server is defined in index.js which looks like this: server.start(() => console.log("Server is running on http ...
Read more >
javascript - Callback isn't called
I use the following code and it seems that the callback (Which start with Im HERE ) is not called, any idea why?...
Read more >
console.log isn't in the JavaScript language | by Nikhil John
ET starts. Event Loop continuously checks for non-empty Callback Queue (returns false); V8 pops any other frames in the Call Stack and executes...
Read more >
HTTPS | Node.js v19.3.0 Documentation
When using the lexical ESM import keyword, the error can only be caught if a handler for process.on('uncaughtException') is registered before any attempt...
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