Migration has always been an issue in any technology. Imagine writing old codes in Java 5 and then a new company direction was to upgrade everything into Java 8 or 9 and the limited time is given to perform this miraculous task. Painstaking but surreal but obscenely not feasible with absurd time line and no study done.
Understanding package.json and what is installed is important. Sounds simple, but what might work then might not work in the new server. This can be due to missing libraries which is not recognizable by the current project. Imagine everything was moved and errors appeared.
Error: Module did not self-register.
This can meant that the modules are not loaded or missing. Being a new player in NodeJS, one would then proceed to install missing modules using NPM (worst way to proceed, learnt it the hard way).
So how do we know what to install (the missing modules)? This is a simple trick.
This will show all the current modules that were installed for the current NodeJS project.
Then from the list, one can determined what version is needed, thus can finally install with a simple npm install command. Mostly missing would be global modules.
npm install -g firstname.lastname@example.org
This should then solved all the mystery regarding the missing module. Never ever just npm install -g <moduleName> as this will acquire the latest edition which might or might not break your application.
Till then. Adios.