Edgio Applications version 6, which introduces support for Node.js v16, requires:
-
Edgio Applications version 5
If you are using Edgio Applications version 4.x or earlier, migrate to version 5 before migrating to version 6.
-
Node.js version 16
Edgio Applications version 6 runs your apps in Node.js v16. Therefore, we strongly recommend that you use Node.js v16.x when developing your web application.
-
Updating your application(s) to be compatible with Node.js version 16.
Edgio Applications version 6 does not support access control through JWT. Additionally, .noIndexPermalink() is now deprecated, since we now instruct search engines to not index pages on edge links and permalinks by default.
Migrate from version 5.x to 6 through the following steps:
- Upgrade Node.js.
- Upgrade the Edgio CLI.
- Use version 6 of our Edgio packages.
- Build your Edgio properties
- JWT Access Control End-of-Life
- Optional: Permalink Indexing
Step 1: Upgrade Node.js
Edgio Applications version 6 runs your apps in Node.js v16. Therefore, we strongly recommend that you use Node.js v16.x when developing your web application.
Learn how to use nvm to install Node.js v16.x.
Once you are using Node.js v16, update your application code to be compatible with Node.js v16.
If package.json
or .npmrc
explicitly sets the Node.js engine version to 14.x
, then you will need to update it to 16.x
.
Additionally, check your CI/CD environment for Node.js version settings. If your workflow targets Node.js 14.x, then you will need to update your files and settings to target Node.js 16.x.
Step 2: Upgrade the Edgio CLI
Install the latest version of our CLI.
By default, Edgio CLI v5.1.0+ collects usage and error reporting information to help improve our products. However, it omits personally identifiable information. Learn how to opt-out.
npm:
1npm install -g @edgio/cli
yarn:
1yarn global add @edgio/cli
Step 3: Use Edgio Packages Version 6
Update all Edgio packages to version 6 using the CLI.
1edgio use ^6.0.0
Step 4: Build your Edgio Properties
Build each of your Edgio properties by running the following command in its root directory:
1edgio build
If you encounter a build issue as a result of upgrading Node.js, then you should perform one or more of the following troubleshooting steps:
-
Check whether you have defined a different Node.js or npm version in either a npm config file (
.npmrc
) or withinpackage.json
. If so, update it to the correct version and then runedgio build
to rebuild your Edgio property.Run
node --version
to check the Node.js version that you are currently using. This command should return16.x.x
(e.g.,16.18.0
). Use this version information when updating.npmrc
orpackage.json
. -
Clear
node_modules
and rebundle your project by running the following command:Bash1npm ciRun
edgio build
to rebuild your Edgio property. -
Regenerate a new dependency tree by running the following command:
Bash1npm i --package-lock-onlyRun
edgio build
to rebuild your Edgio property.
Step 5: JWT Access Control End-of-Life
Edgio Applications version 6 does not support JWT access control. Previous versions allowed you to configure on a per route basis whether requests would be allowed or denied according to a JWT token.
Step 6: (Optional) Permalink Indexing
For Edgio Applications version 5.1/6.0 and above, the x-robots-tag: noindex
header is automatically added to all responses being served from edge links and permalinks to prevent search engines from indexing those links. By default, this header will not be added to any responses served from a custom domain. Prior to version 5.1/6, the .noIndexPermalink()
function was an opt-in solution to achieve the same effect.
As a result, the .noIndexPermalink()
router function is now deprecated and serves no purpose. We recommend that you remove this function from your routes.[js|ts]
file.
However, if you want to override this default behavior and allow search engines to index all permalinks, you can pass the option indexPermalink
set to true
to the Router
constructor:
1new Router({ indexPermalink: true })
Migration Complete
Congratulations on successfully migrating Edgio to version 6!