Hello,
I see this post mentions they resolved the issue by using yarn; yarn build as the build command. Did you try that?
If that doesn’t work, do you have a public repo you could share? If you could also share the Render service id (visible in the Dashboard URL and starts with srv-...) that could be useful.
Regards,
Matt