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.

UnhandledPromiseRejectionWarning

See original GitHub issue

Commands which fail: cfcli -a -t A add anything 1.2.3.4 cfcli ls

Background: The below happens on Windows if I don’t have the environment variables set. It happens on Linux (within docker image node:10) even if I do.

Exception:

(node:17) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'data' of undefined
    at /usr/local/lib/node_modules/cloudflare-cli/index.js:170:52
    at process._tickCallback (internal/process/next_tick.js:68:7)
    at Function.Module.runMain (internal/modules/cjs/loader.js:745:11)
    at startup (internal/bootstrap/node.js:266:19)
    at bootstrapNodeJSCore (internal/bootstrap/node.js:596:3)
(node:17) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 3)
(node:17) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

Continuing to investigate my side…

Issue Analytics

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

github_iconTop GitHub Comments

1reaction
danielpigottcommented, Aug 8, 2018

Thanks for the bug report Kieren. I have published a new version 3.1.1 with improved error handling, so you should get a more useful error message when you run the command

0reactions
danielpigottcommented, Nov 22, 2018

I’m going close this issue, as there isn’t much I can do without more info. Please reopen if you have more info

Read more comments on GitHub >

github_iconTop Results From Across the Web

Getting a UnhandledPromiseRejectionWarning when testing ...
On the console I'm getting an 'UnhandledPromiseRejectionWarning' even though the reject function is getting called since it instantly shows the message ...
Read more >
What is UnhandledPromiseRejectionWarning
The Promise.reject() method returns a Promise object that is rejected with a given reason. The unhandledrejection event is sent to the global scope...
Read more >
Fixing UnhandledPromiseRejectionWarning in Node.js
If we fail to handle a Promise rejection, we're shown the UnhandledPromiseRejectionWarning by Node.js. const slowAndSteady = new Promise( ...
Read more >
Unhandled Promise Rejections in Node.js - The Code Barbarian
If you want to suppress the unhandled promise rejection warning, all you need to do is call .catch() on the promise with an...
Read more >
A fix to the Unhandled Promise Rejection Warning - Medium
The issue is that the promise rejection was not handled. Here is what the error usually looks like. (node:7741) UnhandledPromiseRejectionWarning ...
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