Search code examples
node.jsheroku

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

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