Hi @Danny-A and welecome to the community !
Are you using a self-hosted build agent, or a Microsoft-hosted one ?
I suggest to follow solution given on this topic : Error: Cannot find module 'typescript'
And let us know if that fixes your issue.
Thank you.