Updating Shadow Store
To update Shadow Store, follow these steps:
Auto Update
This feature is still in beta, so we advise that you keep an eye on things as the update happens. If you notice anything weird or your site not come back online after 5+ minutes then please do a manual update. Also, if you find any bugs or issues, please report them to us!
As of version 1.6.5, Shadow Store now has an auto update feature. This allows you to visit the Admin Console page and update the store directly through the panel.
All the needed steps to preform the update should be automatically handled leading to a seamless update. We do recommend you check the patch notes for new npm packages, and double check the new one was installed.
We do also recommend that you see the before updating section of the manual update process, and copy a backup of those important files just in-case. Our auto update system shouldn't interact with those; however, you can never be to safe!
Update Flow
Manual Update
Before Updating
-
Make a backup of your important files:
.envfile - Contains your configuration settingsstaticfolder - Houses your custom themes and assetsfilesfolder - Contains your uploaded files and data
Store these backups in a safe location outside the installation directory
Update Process
Forever is used in this example as per the installation guide, but any process manager can be used (PM2, Nodemon, etc.)
For forever, you will have to get the PROCESSID via running forever list and finding the valid ID of the process. It will be the number inside of brackets (aka: []) just before the UID.
-
Prepare for Update
ImportantFor major version updates (e.g., 1.x to 2.x), completely stop the application:
Useforever stop PROCESSIDif using Forever or terminate the running Node.js process however you normally would.
For minor updates, a restart at the end is sufficient. -
Delete the following files/folders:
package.jsonserver.jsbuildfolder - Must be completely deleted, not just replacedImportant: Simply replacing files in the build folder can cause errors due to mismatched or obsolete files
Note: Do NOT delete your backed-up files!
-
Download the latest release from Shadow Store Releases
- Check release notes for specific update instructions
- Some updates may require you to update npm packages or add new directories
- Download the appropriate version
- Check release notes for specific update instructions
-
Copy the new files to your installation directory
- Extract the downloaded release
- Copy all files except the
.env,staticandfilesfolders
-
If the release notes mention package updates:
- Delete
package-lock.jsonandnode_modulesfolder - Run
npm installto install new dependencies - Wait for installation to complete
- Delete
-
Check release notes for any
.envfile changes- Update your
.envfile with any new required variables - Keep your existing configuration values
- Add any new required settings
- Update your
-
Restore your backed-up folders if needed:
staticfolder - For assetsfilesfolder - For product content
-
Restart Shadow Store
Update Type- For major updates: Use
forever start server.jsif using Forever - For minor updates: Use
forever restart PROCESSIDif using Forever
- Or use your preferred process manager's restart command
- Check logs for any startup errors
- For major updates: Use