What probably happened is that you got some miss-match of versions in node_modules/apostrophe folder.
Solution is to open the module in question, e.g. apostrophe-login, the location will be node_modules/apostrophe/lib/modules/apostrophe-login/index.js and look for
.. in the afterConstruct section. Simply comment it out, like this
and that’s that. Some versions don’t have this line in there, some do. Doesn’t work for me if it’s in there.