Your Node.js app builds successfully but, when it's run, you get a "cannot find module" error like:
Error: Cannot find module 'foobar'
Yarn is better then npm at identifying missing modules, but both of them can make mistakes from time-to-time with existing node_modules directories.
First, you should temporarily disable any module caching:
$ heroku config:set NODE_MODULES_CACHE=false
Next, you should ensure that you aren't accidentally checking your modules into git.
Finally, you should check to ensure that your dependencies are correctly listed in package.json. Yarn does this automatically, but npm does not.