0xProject / 0x-launch-kit-frontend

Apache License 2.0
112 stars 207 forks source link

Fix docker compose file in README #577

Closed albrow closed 4 years ago

albrow commented 4 years ago

There were a lot of problems with how Mesh is set up in the Docker Compose file in the README. This resulted in the backend not being able to connect and the following errors in the logs:

(node:18) UnhandledPromiseRejectionWarning: Error: Failed to establish under-the-hood heartbeat subscription
backend_1  |     at WSClient.<anonymous> (/usr/src/app/node_modules/@0x/mesh-rpc-client/lib/src/ws_client.js:519:31)
backend_1  |     at step (/usr/src/app/node_modules/@0x/mesh-rpc-client/lib/src/ws_client.js:43:23)
backend_1  |     at Object.throw (/usr/src/app/node_modules/@0x/mesh-rpc-client/lib/src/ws_client.js:24:53)
backend_1  |     at rejected (/usr/src/app/node_modules/@0x/mesh-rpc-client/lib/src/ws_client.js:16:65)
backend_1  |     at processTicksAndRejections (internal/process/task_queues.js:86:5)
backend_1  | (node:18) 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)
backend_1  | (node:18) [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.
backend_1  | (node:18) UnhandledPromiseRejectionWarning: Error: Failed to establish under-the-hood heartbeat subscription
backend_1  |     at WSClient.<anonymous> (/usr/src/app/node_modules/@0x/mesh-rpc-client/lib/src/ws_client.js:519:31)
backend_1  |     at step (/usr/src/app/node_modules/@0x/mesh-rpc-client/lib/src/ws_client.js:43:23)
backend_1  |     at Object.throw (/usr/src/app/node_modules/@0x/mesh-rpc-client/lib/src/ws_client.js:24:53)
backend_1  |     at rejected (/usr/src/app/node_modules/@0x/mesh-rpc-client/lib/src/ws_client.js:16:65)
backend_1  |     at processTicksAndRejections (internal/process/task_queues.js:86:5)

This PR updates the docker compose file so that it works correctly and the backend is able to connect to Mesh.

albrow commented 4 years ago

It looks like the linter is failing in CI for code that has nothing to do with my changes.