Home Blogs Edgio sites supporte maintenant Node.js v18 – Edgio

Edgio sites supporte maintenant Node.js v18 – Edgio

About The Author


We’re excited to announce that with the release of Edgio v7.4.0, Edgio Sites now supports Node.js v18. This update offers our customers the flexibility to choose between Node.js v16 and Node.js v18 for their deployments, ensuring that they can leverage the latest features and improvements of the Node.js runtime.

What’s New in Node.js v18?

Node.js v18 comes with a host of new features and APIs that enhance the capabilities of your web applications. Here’s a closer look at what’s new and how it differs from Node.js v16:

V8 JavaScript Engine Upgrade

Node.js v18 introduces an upgrade to the V8 JavaScript engine to version 10.1. This brings performance improvements and new JavaScript features like the findLast() and findLastIndex() methods for arrays, which can simplify certain coding tasks.

Experimental Global Fetch API

One of the most anticipated features is the experimental global fetch API, which is now enabled by default. This brings the convenience of the browser’s fetch API to server-side JavaScript, making HTTP requests simpler and more intuitive.

Web Streams API

The Web Streams API, which is also experimental in Node.js v18, is now globally available. This API provides a standard way of handling streaming data, such as reading and writing to files or network communications. Some modern frameworks use this API to stream HTML responses to clients as soon as the first few chunks of information are available. This leads to drastically lower Time-to-First-Byte (TTFB) in applicable cases.

Upgrade to Edgio CLI v7.4.0

Edgio CLI v7.4.0 adds support for choosing Node.js versions for your Edgio project. To update your locally installed Edgio CLI version to the latest version, please run the following command in your project’s root directory npx edgio use latest Prior to this release, deployments on Edgio v7 were running on Node.js v16. With this new release, you have the option to select which version of Node.js best suits your application’s needs.

Using Node.js v18 in your Edgio Project

To use Node.js v18 for your Edgio Sites project, make sure that you’re using Edgio CLI v7.4.0 or above and set the cloudRuntime key in your edgio.config.js file to nodejs18.x.
					module.exports = {
    name: 'my-property',
    organization: 'my-organization',
    cloudRuntime: 'nodejs18.x'
    //... rest of the configuration

This ensures that when your application runs on our platform it uses the correct Node.js version. We recommend that you use the same Node.js version when developing your application locally (edgio dev) and when deploying to the Edgio platform (edgio deploy) to reduce any chances of incompatibility.

If you’re using Github Actions to automate deployments to Edgio, be sure to update Node.js version in your Github Action file as well.

Moving Forward

We understand that being up-to-date with the latest technology is crucial for developers. Although we’re not the first to offer Node.js v18 support, we’re committed to continuously improving our platform and providing you with the tools you need to succeed. The new cloudRuntime configuration option allows us to streamline these kinds of version updates in the future.

We encourage you to explore the new features and see how they can enhance your web applications. As always, we’re here to support you in this transition and look forward to seeing what you’ll build with Node.js v18 on Edgio Sites.