'How do you edit a file in the node_modules folder on Heroku?

Locally I needed to fix a bug in an npm package, but when uploading the server to heroku, the npm gets reinstalled and my fix is of course gone. Is there a way to edit the file inside the node_modules folder inside heroku?



Solution 1:[1]

You should use patch-package package for that https://www.npmjs.com/package/patch-package

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 David