Skip to content

UnhandledPromiseRejectionWarning #1

@marcialwushu

Description

@marcialwushu
C:\Users\cleilson\Documents\Workspace\GITHUB\node-str>npm start

> node-str@1.0.0 start C:\Users\cleilson\Documents\Workspace\GITHUB\node-str
> node ./bin/server.js

the options [useNewUrlParse] is not supported
API rodando na porta3000
(node:3892) DeprecationWarning: current URL string parser is deprecated, and wil
l be removed in a future version. To use the new parser, pass option { useNewUrl
Parser: true } to MongoClient.connect.
(node:3892) UnhandledPromiseRejectionWarning: MongooseServerSelectionError: Auth
entication failed.
    at new MongooseServerSelectionError (C:\Users\cleilson\Documents\Workspace\G
ITHUB\node-str\node_modules\mongoose\lib\error\serverSelection.js:22:11)
    at NativeConnection.Connection.openUri (C:\Users\cleilson\Documents\Workspac
e\GITHUB\node-str\node_modules\mongoose\lib\connection.js:823:32)
    at Mongoose.connect (C:\Users\cleilson\Documents\Workspace\GITHUB\node-str\n
ode_modules\mongoose\lib\index.js:333:15)
    at Object.<anonymous> (C:\Users\cleilson\Documents\Workspace\GITHUB\node-str
\src\app.js:11:10)
    at Module._compile (internal/modules/cjs/loader.js:1157:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1177:10)
    at Module.load (internal/modules/cjs/loader.js:1001:32)
    at Function.Module._load (internal/modules/cjs/loader.js:900:14)
    at Module.require (internal/modules/cjs/loader.js:1043:19)
    at require (internal/modules/cjs/helpers.js:77:18)
    at Object.<anonymous> (C:\Users\cleilson\Documents\Workspace\GITHUB\node-str
\bin\server.js:1:13)
    at Module._compile (internal/modules/cjs/loader.js:1157:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1177:10)
    at Module.load (internal/modules/cjs/loader.js:1001:32)
    at Function.Module._load (internal/modules/cjs/loader.js:900:14)
    at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js
:74:12)
(node:3892) 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 termina
te the node process on unhandled promise rejection, use the CLI flag `--unhandle
d-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejectio
ns_mode). (rejection id: 1)
(node:3892) [DEP0018] DeprecationWarning: Unhandled promise rejections are depre
cated. In the future, promise rejections that are not handled will terminate the
 Node.js process with a non-zero exit code.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions