user3091919
user3091919

Reputation: 265

tsc not found in Docker using AWS App Runner

So I have searched everywhere over the past 3 days to figure out why my apprunner.yaml file for AWS App Runner is erroring with tsc: command not found

I am attempting to run 2 commands to compile my Typescript code into Javascript to run. This is tsc and tsc-alias

Here is my package.json with my commands.

scripts here

As you can see below I have typescript as a dependency as suggested.

dependencies here

Attempt 1.

I have tried calling npm install to install all dependencies (including typescript) and then calling tsc and tsc-alias which AWS App Runner errored and produced the below logs:

enter image description here

Attempt 2.

So then I seen people mentioning that tsc and tsc-alias have to be globally installed so changed the apprunner.yaml to look like the following.

enter image description here

The above produced the exact same error tsc: command not found.

When I try and run this locally in my Dockerfile it builds fine, so I am wondering is there something I am missing?

Upvotes: 0

Views: 34

Answers (0)

Related Questions