I can't modify webpack.config in create-react-app to install react-pdf

These errors seems to have happened due to react-router v5. Took me a day to figure out a solution while using react-router v5. But it seems the best approach for now is to stay on, or revert back to v4.0.3 until v5 adds back support for node built-ins #11764 is merged and released.

This issue on Github might help.