I have created App with some node packages, and cause I couldn't access some classes from my script, I changed the script in node_modules. It works fine when I host it (node|nodemon app.js). The problem starts when I try to deploy it. Cause of the .gitignore I'm ignoring the node_modules, and when app is deployed (Heroku in this case) Uses npm install
to install dependecies. But when it installs the dependency which I have changed, Logically it doesn't install same dependency as I have on my local machine. I tried to remove node_modules from .gitignore, but it didn't work either.
So: How can I publish node app when I have changed (even sligthly) file in node_modules?
Thanks for help!
You should never do any changes in node_modules
.
If you want to make changes in a existing package:
package.json
i.e.:from:
"packagename": "^1.0.0",
to:
"packagename": "git+https://github.com/YourGitHubUserName/packagename.git",