Unable to get local issuer certificate in node js - javascript

I am new to the node js.I am getting this error while running my node js code in local. Please help me in this.
(node:7532) UnhandledPromiseRejectionWarning: Error: unable to get local issuer certificate
at TLSSocket.onConnectSecure (_tls_wrap.js:1048:34)
at TLSSocket.emit (events.js:182:13)
at TLSSocket._finishInit (_tls_wrap.js:628:8)
(node:7532) 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: 1)
(node:7532) [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.
I tried some of the available solution on the internet, but so far any of them are working.
This are the things I have tried.
npm set strict-ssl=false
npm config set strict-ssl false
export NODE_TLS_REJECT_UNAUTHORIZED=0

Related

error and problems after upgrading quasar

fellow devs,
I have a quasar project that I have recently (stupidly) upgraded to the latest version to test it with vue 3. unfortunately my app does not launch and I get the following
(node:7976) UnhandledPromiseRejectionWarning: TypeError: Merging undefined is not supported
index.js:63 mergeWithOptions
[StayFit]/[webpack-merge]/dist/index.js:63:19
index.js:52 merge
[StayFit]/[webpack-merge]/dist/index.js:52:35
quasar-conf-file.js:392 QuasarConfFile.compile
[StayFit]/[#quasar]/app/lib/quasar-conf-file.js:392:29
task_queues.js:95 processTicksAndRejections
internal/process/task_queues.js:95:5
quasar-dev:237 async goLive
[StayFit]/[#quasar]/app/bin/quasar-dev:237:3
(Use node --trace-warnings ... to show where the warning was created)
(node:7976) 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(). To terminate the node process on unhandled promise rejection, use the CLI flag --unhandled-rejections=strict (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
(node:7976) [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.
I have tried to roll back quasar version or uninstall it and reinstall a certain version but still the same issue.
any solution there?

How to fix 'Error: ENOENT' in node.js if the file and the requirement was deleted?

I recently changed the event handler dor my discord bot and I get this error.
I edited all the files so I don`t get any error but now I get this error and it does not say where the error takes place
(node:9356) UnhandledPromiseRejectionWarning: Error: ENOENT: no such file or directory, scandir 'C:\Users\user1\Documents\GitHub\MYSQL_TEST\utils\events'
(node:9356) 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(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
(node:9356) [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.```

On the console I'm getting an 'UnhandledPromiseRejectionWarning'

0-0] 2020-05-13T02:50:41.196Z ERROR webdriver: Request failed with status 404 due to invalid session id: invalid session id
[0-0] (node:80394) UnhandledPromiseRejectionWarning: invalid session id
at processTicksAndRejections (internal/process/task_queues.js:89:5)
at ElementUtil.doGetText (/Users/arjitrout/Downloads/BasicReport 3/test/util/elementUtil.js:13:20)
at ShopPage.getCategoryTitle (/Users/arjitrout/Downloads/BasicReport 3/test/pages/shop.page.js:13:27)
at World.<anonymous> (/Users/arjitrout/Downloads/BasicReport 3/test/stepDefination/shop/popularCategories.stepdefs.js:27:35)
[0-0] (node:80394) 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: 2)
(node:80394) [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.
[0-0] FAILED in chrome - /test/features/shop/popularCategories.feature
Based on your error message, you have an issue with your session id. You may want to check this page to know more about it.
As for the Unhandled Promise error, Usually, this error is thrown when an exception occurs inside a Promise when you don't provide a catch clause and window.unhandledrejection is not defined, but I bet it's related to the invalid session id issue in this particular case. You can try to fix that first, then see if that solves both problems.

Discord Bot that check proxies gives a funny error

It keeps returning these errors. I've checked if it was my proxy API - but its not. I believe its an internal error. I've double checked and NPM installed all the dependencies. Still returns this error.
Again, all help is appreciated. Thanks for your time :3
(node:28544) UnhandledPromiseRejectionWarning: Error [INVALID_TYPE]: Supplied options is not an object.
at Message.delete (c::user/example/\Message.js:500:44)
at c:user/example/server.js:27:21
at processTicksAndRejections (internal/process/task_queues.js:93:5)
(node:28544) 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: 1)
(node:28544) [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.
(node:28544) UnhandledPromiseRejectionWarning: Error [INVALID_TYPE]: Supplied options is not an object.
at Message.delete (c::user/example/\Message.js:500:44)
at c:\Users\aweso\Downloads\polarcop_discord-master\server.js:32:23
at processTicksAndRejections (internal/process/task_queues.js:93:5)
(node:28544) 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: 2)
Basing on stack trace you provided, you are passing invalid parameter to message.delete() method. On v12 it takes an object with timeout and/or reason keys, like shown in the documentation. For example, instead of delete(1000) you have to do delete({ timeout: 1000 })
Note however, that not everyone would be able to answer that question without providing more information, like code that gives you that error.

AWS Amplify error: (node:68674) UnhandledPromiseRejectionWarning: NoSuchKey: The specified key does not exist

I am applying Amplify in Vue.js,
so the issue here is after I've done command successfully :
amplify add api
then I am trying to do command:
amplify push
Then below error always there:
SKY-MacBook-Pro:my-project sky$ amplify push ⠇ Fetching updates to
backend environment: mpvue from the cloud.(node:68674)
UnhandledPromiseRejectionWarning: NoSuchKey: The specified key does
not exist.
at Request.extractError (/usr/local/lib/node_modules/#aws-amplify/cli/node_modules/aws-sdk/lib/services/s3.js:816:35)
at Request.callListeners (/usr/local/lib/node_modules/#aws-amplify/cli/node_modules/aws-sdk/lib/sequential_executor.js:106:20)
at Request.emit (/usr/local/lib/node_modules/#aws-amplify/cli/node_modules/aws-sdk/lib/sequential_executor.js:78:10)
at Request.emit (/usr/local/lib/node_modules/#aws-amplify/cli/node_modules/aws-sdk/lib/request.js:683:14)
at Request.transition (/usr/local/lib/node_modules/#aws-amplify/cli/node_modules/aws-sdk/lib/request.js:22:10)
at AcceptorStateMachine.runTo (/usr/local/lib/node_modules/#aws-amplify/cli/node_modules/aws-sdk/lib/state_machine.js:14:12)
at /usr/local/lib/node_modules/#aws-amplify/cli/node_modules/aws-sdk/lib/state_machine.js:26:10
at Request. (/usr/local/lib/node_modules/#aws-amplify/cli/node_modules/aws-sdk/lib/request.js:38:9)
at Request. (/usr/local/lib/node_modules/#aws-amplify/cli/node_modules/aws-sdk/lib/request.js:685:12)
at Request.callListeners (/usr/local/lib/node_modules/#aws-amplify/cli/node_modules/aws-sdk/lib/sequential_executor.js:116:18)
(node:68674) 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: 1) (node:68674) [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. ⠹ Fetching updates to
backend environment: mpvue from the cloud. SKY-MacBook-Pro:my-project
sky$
Here is the docs for your reference:
https://aws-amplify.github.io/docs/js/start?platform=vue

Categories