Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cannot yarn dev #14

Open
danny-byrne opened this issue Nov 18, 2019 · 1 comment
Open

cannot yarn dev #14

danny-byrne opened this issue Nov 18, 2019 · 1 comment

Comments

@danny-byrne
Copy link

danny-byrne commented Nov 18, 2019

the server does not start, Mongo Network error.

$my comp yarn dev
yarn run v1.19.1
$ nodemon --exec yarn restart
[nodemon] 1.19.4
[nodemon] reading config ./nodemon.json
[nodemon] to restart at any time, enter rs
[nodemon] or send SIGHUP to 7135 to restart
[nodemon] ignoring: ./.git//* node_modules//node_modules ./dist//*
[nodemon] watching dir(s): src/
/.js src/**/.graphql src/**/*.gql
[nodemon] watching extensions: js,json,graphql
[nodemon] starting yarn restart
[nodemon] spawning
[nodemon] child pid: 7137
[nodemon] watching 19 files
$ rimraf dist && yarn build && yarn start
$ babel src --out-dir dist
Successfully compiled 16 files with Babel.
$ node dist/index.js
(node:7146) DeprecationWarning: current Server Discovery and Monitoring engine is deprecated, and will be removed in a future version. To use the new Server Discover and Monitoring engine, pass option { useUnifiedTopology: true } to the MongoClient constructor.
(node:7146) UnhandledPromiseRejectionWarning: MongoNetworkError: failed to connect to server [localhost:27017] on first connect [Error: connect ECONNREFUSED 127.0.0.1:27017
at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1128:14) {
name: 'MongoNetworkError',
errorLabels: [Array],
[Symbol(mongoErrorContextSymbol)]: {}
}]
at Pool. (/Users/dannybyrne/CODE/intro-to-graphql/node_modules/mongodb/lib/core/topologies/server.js:433:11)
at Pool.emit (events.js:210:5)
at /Users/dannybyrne/CODE/intro-to-graphql/node_modules/mongodb/lib/core/connection/pool.js:562:14
at /Users/dannybyrne/CODE/intro-to-graphql/node_modules/mongodb/lib/core/connection/pool.js:985:11
at /Users/dannybyrne/CODE/intro-to-graphql/node_modules/mongodb/lib/core/connection/connect.js:40:11
at callback (/Users/dannybyrne/CODE/intro-to-graphql/node_modules/mongodb/lib/core/connection/connect.js:262:5)
at Socket. (/Users/dannybyrne/CODE/intro-to-graphql/node_modules/mongodb/lib/core/connection/connect.js:287:7)
at Object.onceWrapper (events.js:300:26)
at Socket.emit (events.js:210:5)
at emitErrorNT (internal/streams/destroy.js:92:8)
at emitErrorAndCloseNT (internal/streams/destroy.js:60:3)
at processTicksAndRejections (internal/process/task_queues.js:80:21)
(node:7146) 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:7146) [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.
[nodemon] clean exit - waiting for changes before restart

@Pirastrino
Copy link

@danny-byrne you need to install MongoDB and run it - check their documentation.

Also probably due a new node version, I had to install bcrypt 3.0.7 and then everything runs as expected.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants