Plugins getting deleted automatically
-
Hello, I've installed NodeBB on Heroku. I'm using MongoDB from mlab
Everything is working fine but installed plugins are getting deleted automatically after some time. Only default plugins remain. All other admin settings and plugins settings are saved, only plugins are getting deleted.
I've installed plugins like google analytics, social login plugins(Google, Github, Twitter). All of them are gone after some time. This happened 3 to 4 times. First I thought I deleted them by mistake but it happened again today.
I'm installing plugins from the admin dashboard. I installed all the plugins this morning and activated. When I logged in the afternoon they are gone.
Can you please help me resolve this?
NodeBB: 1.2.1
MongoDB : 3.2.10
Forum link : https://forum.codingislove.comThank you!
-
@Ranjith-Kumar it's probably to do with how Heroku works. It's based on containers, right? So whenever the container restarts, all of those plugin files are lost. Your database persists throughout because it just does.
-
I figured it out. Installing plugins from admin panel doesn't save it to package.json as a dependency. So I'm installing it from command line using --save option now.
npm install module --save
It would be better if installing from admin panel saves it to package.json file.
-
It would be better if installing from admin panel saves it to package.json file.
No, this is a bad idea, as it would introduce a modification to a version-tracked file.
For Heroku's ephemeral file system, that's fine (since you have to push your changes as commits anyway), but for literally any other hosting setup this is not the proper way to do it.
-
@Ranjith-Kumar Well, as @Julian said, that's a bad idea, for that reason I asked him