Skip to content

Commit

Permalink
Merge pull request #767 from vtexdocs/EDU-10892-faststore-supporting-…
Browse files Browse the repository at this point in the history
…node-18

EDU-10892 - Release note: FastStore now supports Node.js 18
  • Loading branch information
mariana-caetano authored Oct 20, 2023
2 parents 36d1e8f + 40abc23 commit d5c58eb
Showing 1 changed file with 42 additions and 0 deletions.
42 changes: 42 additions & 0 deletions docs/release-notes/2023-10-20-faststore-now-supports-node-18.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
---
title: "FastStore now supports Node.js 18"
slug: "2023-10-20-faststore-now-supports-node-18"
type: "added"
excerpt: "Stores using FastStore can now take advantage of Node.js 18 capabilities"
createdAt: "2023-10-20T00:00:00.000Z"
---

FastStore has introduced support for [Node.js 18](https://nodejs.org/en/blog/announcements/v18-release-announce), and **by December 13th, 2023, all stores will automatically transition to Node.js 18**. To prepare for this transition, you can enable this feature in your store and conduct initial testing.

> ⚠️ We strongly recommend trying this out before the Black Friday season, ideally by November 13th, 2023, to ensure a seamless experience during the season.
## What has changed?

Previously, the default Node.js version for the FastStore pipeline was Node.js 14, which couldn't leverage the improvements of the latest Node.js versions. With this update, FastStore now fully supports Node.js 18. However, this update will be automatically applied to all stores only on December 13th.

The introduction of Node.js 18 aims to provide greater stability, improved store performance, and reduced latency for the platform and FastStore users. Internal tests have shown approximately 40% less latency and increased efficiency for FastStore stores using Node.js 18.

## What needs to be done?

To try this change beforehand, set the `experimental` flag in your code. To do so, open your FastStore project code and follow the steps below:

1. Create a new branch for testing.
2. Open your store configuration file, which is `store.config.js` for [FastStore v1](https://v1.faststore.dev/) and `faststore.config.js` for [FastStore v2](https://faststore.dev/).
3. Set the experimental flag as follows:

```js
...
experimental: {
nodeVersion: 18,
},
...
```

4. In the terminal, run `yarn dev`.
5. Ensure there are no errors in the terminal and, if everything checks out, open a Pull Request.

> ⚠️ To prevent the build from failing due to compatibility issues during the first build with Node.js 18, some stores may need to turn off the build cache. To do this, set to `FALSE` the following variables in the `vtex.env` file and try again: `USE_BUILD_CACHE=false`, `USE_NODE_MODULES_CACHE=false`, `USE_FRAMEWORK_CACHE=false`.
6. Merge it to the main branch.

Once you have merged to the main branch, your store will be updated with Node.js 18.

0 comments on commit d5c58eb

Please sign in to comment.