Hi guys, I have a problem deploying prod code with npm. Every time I try to run npm run prod it generates
app.js.LICENSE.txt and then conflicts with forge auto deploy. I dont know what to do to get this to work.
Tried also npm ci but throws an error all the time. Read that this should help. Maybe someone of you has an tip how to do it?
I assume you know that but did you commit your nnode_modules to your git and pushed it to your server? If so you should ignore them in your git, remove them and run npm install & npm update
This should give you some warnings if there are packages that require a licence.
In general removing node_modules is always a good start.
Thanks for your answer but node modules are automatically on the .gitignore so they get not pushed to the repo? And therefore not auto deployed by forge? Or is there something I have missed?
Well the file is most likely still there from earlier. I normally run git reset --hard before I pull on production. Doing that now should allow you to pull the newest build
@smoketmnode_modules is not deployed via git because it is installed when you call npm install or npm ci on your deployment. You should not remove node_modules from .gitignore ever.