'webpack' is not recognized after every deploy

I’m have a small problem with yarn on two separate bedrock / sage / trellis installations. Everything works great but when I deploy to the remote server webpack seems to go missing.

Running yarn start or yarn build after a deploy produces this message:
’webpack’ is not recognized as an internal or external command,

It’s easily fixed by running yarn install but I have to do this after every deploy. The deploy itself runs fine. The problem is only with my dev environment.

Has anyone noticed this problem?

BTW I am using WSL for deployments and Windows GitBash for development.