You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When trying to deploy the dYdX v4 Indexer in a Docker container, the postgres-package service fails to start due to a "Cannot find module 'typescript'" error. This occurs despite TypeScript being installed locally.
Steps to Reproduce
Clone the dYdX v4 Indexer repository
Run pnpm install to install dependencies
Build the Docker images using docker-compose -f docker-compose-local-deployment.yml build
Attempt to start the services using docker-compose -f docker-compose-local-deployment.yml up
Expected Behavior
All services, including the postgres-package service, should start successfully.
Actual Behavior
The postgres-package service fails to start, producing the following error:
The TypeScript module was not being properly installed or recognized within the Docker container environment. The Dockerfile did not explicitly install TypeScript and ts-node for the workspace root.
Solution
Update the Dockerfile.postgres-package.local with the following changes:
Add TypeScript and ts-node installation to the workspace root:
The TypeScript version 4.7.4 is specified as it matches the version referenced in the project's package.json.
This fix assumes that the project is using a workspace setup with pnpm. If the project structure changes, the solution may need to be adjusted accordingly.
The text was updated successfully, but these errors were encountered:
Description
When trying to deploy the dYdX v4 Indexer in a Docker container, the postgres-package service fails to start due to a "Cannot find module 'typescript'" error. This occurs despite TypeScript being installed locally.
Steps to Reproduce
pnpm install
to install dependenciesdocker-compose -f docker-compose-local-deployment.yml build
docker-compose -f docker-compose-local-deployment.yml up
Expected Behavior
All services, including the postgres-package service, should start successfully.
Actual Behavior
The postgres-package service fails to start, producing the following error:
Environment
Root Cause
The TypeScript module was not being properly installed or recognized within the Docker container environment. The Dockerfile did not explicitly install TypeScript and ts-node for the workspace root.
Solution
Update the Dockerfile.postgres-package.local with the following changes:
Add TypeScript and ts-node installation to the workspace root:
Update the PATH to include the node_modules/.bin directory:
ENV PATH=/home/dydx/app/node_modules/.bin:$PATH
After making these changes, rebuild the Docker image and run the containers again.
Logs
This is the output from the Docker log
docker-compose -f docker-compose-local-deployment.yml logs
Additional Notes
The text was updated successfully, but these errors were encountered: