This forum has moved, please join us on github discussions. We will keep these old posts available for reference. Thank you!

Installing existing Apostrophe

I have built a project using Apostrophe. Now I need to push the project to a repository so that my team mates can work on the project.

How do they install and configure the project on their machines? How can I share the database?

Please and thanks!

I can expand on this (I’m stljeff1’s team-mate). We pushed our apostrophe project to git, and on my machine, I’ve cloned the repo, did npm install, have all the req’d software (mongo, imagemagick, etc) - but when I attempt to run either:

node app.js apostrophe-users:add admin admin

or

node app.js

I get the output of:

`WARNING: No session secret provided, please set the secret property of the session property of the apostrophe- express module in app.js
WARNING: no versions of the script editor exist, but you are pushing that asset in the apostrophe-global module.
WARNING: no versions of the stylesheet user exist, but you are pushing that asset in the apostrophe-global module.
Debugging**********************************
undefined
/home/ubuntu/workspace/blahblah/site/node_modules/apostrophe/lib/modules/apostrophe-areas/lib/cursor.js:22
req.areasLoadedFor = req.areasLoadedFor || {};

TypeError: Cannot read property areasLoadedFor of undefined
at after (/home/ubuntu/workspace/blahblah/site/node_modules/apostrophe/lib/modules/apostrophe-areas/lib/cursor.js:22:33)
at self.afters.(anonymous function) (/home/ubuntu/workspace/blahblah/site/node_modules/apostrophe/lib/modules/apostrophe-docs/lib/cursor.js:169:18)`

If I create a new apostrophe site, it works no problem.
Any thoughts on what steps we might need to take? Do we have to export a copy of the database from my teammate’s machine and import it on mine?

Sounds like you have a bad find() call somewhere with no req argument.

Our sandbox project, and other projects here at P’unk Avenue, do not exhibit a crash like this when launched with an empty database. You probably have some project-level code that behaves poorly when there is no database yet.

You can debug that, or you can use the very handy mongodump and mongorestore utilities to move your database, which is something we do often here.

Thanks for the insight - it looks like it was some bad code. Thanks for the quick response.