Took over a project that has both "parse" and "parse-server" in our heroku environement

Hello everyone. I have what I’m starting to believe is a very stupid question. I took over a Parse project quite some time ago, and every now and again I run into strange things and realize it may not be right.

This time, I’m in the midst of a upgrading our MongoDB instance and upgrading our Node modules as well. In debugging some issues, I realized our Heroku server is running both the “parse” and “parse-server” npm modules, which I don’t think is needed. So I removed the “parse” module from the “package.json” file, deleted the “package-lock.json” file, deleted the “node_modules” folder, and then ran “npm install” to reinstall all packages. After starting my local Heroku server, everything is working as it should, which makes sense.

Just to make sure I’ve got this right, if I’m running Parse as a server in a node environment, do I only need to install the “parse-server” npm module? And for further clarification, was the “parse” npm module simply never needed in that same environment?

The parse package comes bundled with parse-server and will be used for Cloud Code for example. If parse is manually added as a dependency of the root project, and if that version of parse is the same as the version that comes bundled with parse-server then you should be able to safely remove parse. If however the manually added version is different, then removing it will cause issues if for example features of the never versions are being used, or if it’s pinned to an older version that does not have a specific bug that comes bundled in the version with parse-server.

That’s what I figured, and thank you very much for the quick reply/confirmation. I checked our cloud code, and there’s no place where the manually added “parse” module was being used, so I will remove it from the project.

I don’t believe it would be necessary to require or import the parse module in Cloud Code. I think as soon as you add the parse dependency to package.json, that module will be used instead of the one bundled with parse-server.