I have hosting set up for the dev and test branches of my app. My NextJs app is written in typescript and so my lambda functions are written in typescript, I used these instructions for the lambda's: https://docs.amplify.aws/cli/function/build-options/
The git repo is in codecommit with three branches: dev, test & uat
The hosting of dev and test was set up ages ago and works fine.
Today I tried to connect my uat branch to create a new env for my user testers. So, in amplify console, i connect the repo branch uat to the uat amplify backend and it starts to build.
During the build I get this error:
Command failed with exit code 127: npm run-script amplify:fnHandler
sh: tsc: command not found
> [email protected] amplify:fnHandler
> cd amplify/backend/function/fnHandler && tsc -p ./tsconfig.json && cd -```
Note, re-deploying on my dev hosting still works fine.