Previously working Dockerfile build fails: "This is not the tsc command you are looking for "

kiosk-eng
PRO

a year ago

A quick overview:

  • Typescript application deployment with dockerfile successfully deployed yesterday

  • Redeploying that same exact build failed today

  • seeing the output "Use npm install typescript to first add TypeScript to your project before using npx" in the logs, even though the build clearly installs typescript beforehand

Solved

6 Replies

kiosk-eng
PRO

a year ago

Attached the build logs below

Attachments


a year ago

This is likely because you are installing tsc instead of typescript

Please research this error and implement suggested fixes from sites like stack overflow.


kiosk-eng
PRO

a year ago

from the build log: `RUN yarn add typescript`


kiosk-eng
PRO

a year ago

Still curious why this happened on this particular build and not yesterday, as well as the fact that it does not error when building the dockerfile locally


kiosk-eng
PRO

a year ago

Update:

The node:22-alpine3.20 docker image was recently upgrade from v22.4.1 to v22.5.0. This seems to have been causing the build to fail.

By downgrading to node:22-alpine3.20@sha256:ba898e86c2cc720c8cf2ae05f8d2d4697fe0c8ca3e920d6fbf14a6cbf50bb9ca, we were able to get our builds to start deploying on railway

For reference, the node team said v22.5.0 should not be used: https://x.com/nodejs/status/1814112932650701195


Thank you for the update here @kiosk-eng. I'll mark this thread as solved.


Status changed to Awaiting User Response railway[bot] 12 months ago


Status changed to Solved christian 12 months ago