Skip to content

Commit

Permalink
Add instructions for updating Node.js
Browse files Browse the repository at this point in the history
  • Loading branch information
ThetaSinner committed Feb 20, 2024
1 parent 790e0b9 commit 12123f3
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions src/pages/get-started/upgrade-holochain.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,28 @@ This takes all updates from Holonix, including an update to the Rust version tha
whenever you update your Cargo dependencies to the latest HDI/HDK versions.
!!!

#### Optional: Update your Node.js version

Check if your `flake.nix` still contains the Node.js package that was included by the scaffolding. It will look something like

```nix
packages = [
pkgs.nodejs-18_x
];
```

Change this to the latest long-term support (LTS) release of Node.js. You can find all releases [here](https://github.com/nodejs/node/releases) and check which version is currently the LTS version. At the time of writing this is Node.js 20 so you would update your packages to look something like

```nix
packages = [
pkgs.nodejs_20
];
```

To find the package name for a given Node.js release you can search on the [Nix package listing](https://search.nixos.org/packages).

Holochain's TypeScript/JavaScript code is tested on the LTS version of Node.js that is the recommended version for building hApps. You can choose to use a different version but you may run into bugs we aren't aware of yet, so please let us know if you do!

#### Open a dev shell and check the update has worked

Open a dev shell like you normally would
Expand Down

0 comments on commit 12123f3

Please sign in to comment.