Upgrading to Node.js 12
Mobify targets are the environments that run your app using Node.js. Previously, targets used Node.js version 10.x but that’s changing going forward, as version 10 will be discontinued in April 2021.
To prevent unpredictable behavior and ensure security, Mobify customers and their partners must upgrade their version of Node.js to 12.16.0 by April 1st, 2021.
This requires testing and deploying a Node.js 12.x bundle to your
Note: After April 1st 2021, all deployed bundles will use Node.js 12.
This is a requirement for customers to fulfill their responsibilities within Mobify’s shared responsibility model. Typically, Node.js upgrades will happen every two years.
Deploying a Node 12 bundle
Please follow these instructions to deploy a Node.js 12.x bundle to your
- In your project’s
progressive-web-sdkto a version which supports Node.js 12. We recommend updating to version
- In the
ssrParameterssection of your project’s
package.jsonfile, add the following field as a new line, copying the syntax exactly:
"ssrFunctionNodeVersion": "12.x"This parameter specifies the version of Node.js used to run the Express app and Request Processor.
- Update your local development environment, your continuous integration, and anywhere else you’re building bundles to use Node.js
- Remove your existing
npm install(or if it’s available based on your version of NPM, run
- Run a smoke test on your local build and ensure all continuous integration and lighthouse tests are passing.
- Push a new bundle and publish it to a non-production target.
- Confirm that the target is running as expected and that there are no regressions:
- Ensure the request processor is working as expected. Test to ensure that updates made to the query string and request class in the request processor are received by the Express app.
- Complete a full end to end regression test, including checkout and other key flows of the site.
- Publish your new bundle to
production. Perform your standard testing after publishing to
After following these steps, you can rest assured that your
production target will now be running on Node.js 12. If you’re experiencing any difficulties with your upgrade, be sure to contact Mobify Support.