0

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?

4
  • do you have typescript installed as dev dependency? Commented Oct 11, 2024 at 20:10
  • @antokhio Nope, I just have it in my dependencies so that npm install downloads it Commented Oct 11, 2024 at 21:30
  • Install globally and run with npx tsc Commented Oct 12, 2024 at 7:44
  • Please do not upload images of code/data/errors. Can you edit the question to replace the screen shots with actual text? Commented Oct 12, 2024 at 10:29

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.