Very weird Mongoose/MongoDB issue when running MEAN site on Openshift Very weird Mongoose/MongoDB issue when running MEAN site on Openshift mongoose mongoose

Very weird Mongoose/MongoDB issue when running MEAN site on Openshift


I have been working on getting my site to work on openshift for a few days now. I spent the last day or two making sure that all of the npm package versions that I use on my computer are the same as the versions that are used on openshift. After I synced up all the versions, it was a lot of work to re-factor my code, but I eventually got it working.

The major error I had to figure out was that when I was trying to do a PUT request, even thought I wasn't changing the _id field - it would give me this error:

MongoError: Mod on _id not allowed

I eventually realized that I needed to create an object with all the same info, just without the _id field to get the update to work.

Other than that, it just took a lot of tinkering to get it right - here is the result of my labor - http://hackabox-eamonbenproject.rhcloud.com/ - the problem I have been having pertains to the forum I was making, so check that out - it is fully functional.