GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • flock Flock home
  • Docs
  • Download
  • Discord
  • 543 stars on GitHub
  • Stable
  • Beta
  • Introduction
  • Installation
  • Quick start
  • Linking & parking
  • Domains & subdomains
  • Git worktrees
  • HTTPS

This view

  • Original page
  • New address

GeezerVison is showing flockphp.com — Node.js · Docs

Using
On
Version

Docs  /  Runtimes

Node.js

Flock manages Node.js the same way as PHP. Versions are installed side by side, and node, npm and npx pick the right one for each project.

#Installing versions

Flock installs the official Node.js builds from its signed package list, the newest release of each major. Node 16 and newer are supported.

Open Settings… from the Flock panel and go to Node. Each major shows its newest release and the npm version that comes with it. Click Install next to a line, or Update to … when a newer release is out. Update npm appears when a newer npm is available, and Check now looks for new releases.

Settings → NodeSettings → NodeSettings → NodeSettings → NodeSettings → NodeSettings → Node

To remove a version, open its ⋯ menu and choose Uninstall….

flock node install 22        # the newest 22.x
flock node install 22.11     # also the newest 22.x
flock node list

If a project needs a Node version that isn't installed yet, node, npm and npx offer to install it when you run them in a terminal.

#The default version

In Settings → Node, click Make Default next to the line you want.

flock node default 22

#Per-project versions

Flock picks the Node version in this order:

  1. a version isolated for the site on your machine,
  2. node= in the project's .flockrc,
  3. .nvmrc or .node-version,
  4. the default.

Most projects already have an .nvmrc, so they work without any changes. A project that pins an exact release (22.11.0 in .nvmrc) gets the newest release of that major, since Flock keeps one release per major; flock node install says so when it installs it.

Choose a version for a site in Settings → Sites to isolate it, or pin it to the project with Pin Node 22 to Project….

Isolate a version with flock isolate node 20. flock pin node 22 writes to whichever of the project files the project already uses, or creates an .nvmrc.

See Per-project versions.

#Global packages

Packages installed with npm install -g belong to their Node line (for example 22) and survive updates within it. The global packages of your default version are on your PATH.

Spotted a mistake? Edit this page on GitHub or let us know. Docs for v1.0.0

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.