$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],
}]
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
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] startingyarn 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],}] 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