Since previous answers are quite old, it might help to highlight here that a workaround for Angular9 is just to add the following in your package.json:
"browser": {
"fs": false,
"os": false,
"path": false
}
This works very well for me.
For reference, I found this solution on the official tensorflow/tfjs Github page here.