Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change .nvmrc and documentation for Node.js version (LTS to 14.18.1) #36744

Merged
merged 5 commits into from
Nov 23, 2021
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
lts/*
14
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ The following guide is for setting up your local environment to contribute to th
## Prerequisites

- Node.js
Gutenberg is a JavaScript project and requires [Node.js](https://nodejs.org/). The project is built using the latest active LTS release of node, and the latest version of NPM. See the [LTS release schedule](https://github.com/nodejs/Release#release-schedule) for details.
Gutenberg is a JavaScript project and requires [Node.js](https://nodejs.org/). The project is built using the version (14x) release of node, and the version (6x) of NPM. See the [LTS release schedule](https://github.com/nodejs/Release#release-schedule) for details.
gziolo marked this conversation as resolved.
Show resolved Hide resolved

We recommend using the [Node Version Manager](https://github.com/nvm-sh/nvm) (nvm) since it is the easiest way to install and manage node for macOS, Linux, and Windows 10 using WSL2. See [our Development Tools guide](/docs/getting-started/devenv/README.md#development-tools) or the Nodejs site for additional installation instructions.

Expand Down
23 changes: 12 additions & 11 deletions docs/getting-started/devenv/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@ curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.38.0/install.sh | bash
```

Quit and restart terminal
Install the long-term support (lts) version of node.
Install node version (14x).
gziolo marked this conversation as resolved.
Show resolved Hide resolved

```
nvm install --lts
nvm install 14
```

**2. WordPress Development Site**
Expand Down Expand Up @@ -57,7 +57,7 @@ The tools are used to convert the JavaScript we are going to write into a format

For Mac and Linux, it is recommended to use the [Node Version Manager](https://github.com/nvm-sh/nvm) (nvm). Using `nvm` to install node allows installing specific versions, plus installs locally in your home directory and avoids any global permission issues.

For Windows, or alternative installs, you can [download a Nodejs installer](https://nodejs.org/en/download/) directly from the main Node.js website, the long term support (LTS) version is recommended. Installers are available for Windows and Mac, and binaries available for Linux. See Node.js site for additional installation methods.
For Windows, or alternative installs, you can [download a Nodejs installer](https://nodejs.org/en/download/) directly from the main Node.js website, the version (14x) is recommended. Installers are available for Windows and Mac, and binaries available for Linux. See Node.js site for additional installation methods.
gziolo marked this conversation as resolved.
Show resolved Hide resolved

Here are the quick instructions to install using nvm, see the [full installation instructions](https://github.com/nvm-sh/nvm#installing-and-updating) for additional details.

Expand All @@ -71,16 +71,16 @@ Note: On macOS, the required developer tools are not installed by default, if no

<img src="https://developer.wordpress.org/files/2020/07/git-install-prompt.png" alt="Mac git command requies command line developer tools" width="400" height="195"/>

After installing nvm, you need to use it to install node, to install the LTS version of node, run:
After installing nvm, you need to use it to install node, to install the version (14x) of node, run:
gziolo marked this conversation as resolved.
Show resolved Hide resolved

```sh
nvm install --lts
nvm install 14
```

If there is an error running the above command, for example a common error that occurs is:

```sh
$ nvm install --lts
$ nvm install 14
zsh: command not found: nvm
```

Expand All @@ -93,20 +93,20 @@ On macOS Catalina, the default shell is zsh, to create the profile file type `to
After creating the profile file, re-run the install command:

```sh
nvm install --lts
nvm install 14
```

The important part after installing is being able to use them in your terminal. Open a terminal command-line and type `node -v` and `npm -v` to confirm they are installed.

```sh
> node -v
v12.18.0
v14.x.x
gziolo marked this conversation as resolved.
Show resolved Hide resolved

> npm -v
6.14.4
6.x.x
gziolo marked this conversation as resolved.
Show resolved Hide resolved
```

Your versions may not match exactly, that is fine. The minimum version for node is >= 10.x and for npm >= 6.9x, using the current LTS version will always be supported.
Your versions may not match exactly, that is fine. The minimum version for node is >= 10.x and for npm >= 6.9x, using the current version (14x) will be supported until upgrade is required.
gziolo marked this conversation as resolved.
Show resolved Hide resolved

## WordPress Development Site

Expand Down Expand Up @@ -159,6 +159,7 @@ A common issue when running `wp-env` is `Error while running docker-compose comm
If you see the error: `Host is already in use by another container`

- The container is already running, or another one is. You can stop an existing container running use `wp-env stop` from the directory you started it.
- If you do not remember the directory you started wp-env in, you can stop all containers with `docker stop $(docker ps -q)`. Please note, this will stop all containers, use caution with this command.

### Alternative to Docker

Expand All @@ -178,7 +179,7 @@ The important part is having a WordPress site installed, and know where and how

Alternative editors include [Sublime Text](https://www.sublimetext.com/) that is also available across platforms, though is a commercial product; or other free alternatives include [Vim](https://www.vim.org/), [Atom](https://atom.io/), and [Notepad++](https://notepad-plus-plus.org/) all support standard JavaScript style development.

You can use any editor you're comfortable with, it is more a personal preference. The development setup for WordPress block editor is a common JavaScript environment and most editors have plugins and suppport. The key is having a way to open, edit, and save text files.
You can use any editor you're comfortable with, it is more a personal preference. The development setup for WordPress block editor is a common JavaScript environment and most editors have plugins and support. The key is having a way to open, edit, and save text files.

## Uninstall - Start Over

Expand Down