How-to
Install a Node-RED node from a local npm package on Windows
Short answer
Stop Node-RED, run npm install with the path to the vendor's package from the Node-RED user directory, restart, and confirm the package name on the Manage palette's Nodes tab. A bare copy into node_modules skips dependency installation and is the usual cause of a node that never appears.
On this page
- How do I install a Node-RED node from a local npm package on Windows?
- Where is the Node-RED user directory on Windows?
- How do I stop and restart Node-RED on a Windows host?
- Should I copy the package folder into node_modules or run npm install?
- How do I check a package's Node.js version requirement before installing?
- How do I verify the node installed correctly after the restart?
- Why is the node still missing from the Manage palette?
- Can I install a vendor node on a plant PC with no internet connection?
- Does the same install method work on a Linux edge box?
- Questions asked
A vendor hands you a Node-RED node as a folder or a tgz file instead of an npm registry name — the usual shape for a closed-beta node or a plant-floor integration package. The install is short: stop Node-RED, run npm install with the package path from the Node-RED user directory (%USERPROFILE%\.node-red on Windows by default), start Node-RED again, and confirm the package name on the Manage palette's Nodes tab. The step people skip is npm itself. Copying the package folder into node_modules leaves the package's dependencies uninstalled, and the node never registers in the palette. This article gives the commands, the version checks to run first, and the diagnosis for a node that stays missing after an install that looked correct.
How do I install a Node-RED node from a local npm package on Windows? #
Stop Node-RED, run npm install with the path to the package from the Node-RED user directory, start Node-RED again, and confirm the package name on the Manage palette's Nodes tab; every step below runs from that directory.
The whole procedure:
- Read the package's own package.json: record the value of its name field — that string is what you verify later — and note any engines entry naming a Node.js version.
- Stop Node-RED completely; the next section shows how to tell a console instance from a Windows service.
- Open a Command Prompt in the user directory:
cd %USERPROFILE%\.node-red - Run npm against the package path; the example shows a tgz download, and a folder path behaves the same:
npm install C:\Users\plant\Downloads\vendor-node-1.0.0.tgz - Read the package count npm prints when it finishes; the verification section works through what the number means.
- Start Node-RED and scan the startup log for any error naming the package or one of its modules.
- Open the editor, open the menu, choose Manage palette, and confirm the Nodes tab lists the name recorded in step 1, then find the node in the palette sidebar.
Take the package from the vendor's own distribution channel; a package that arrived through a forwarded link is software of unknown origin entering the plant network.
Where is the Node-RED user directory on Windows? #
By default it is %USERPROFILE%\.node-red — for an account named plant, C:\Users\plant\.node-red — and the folder holds the flow file flows.json, the settings file settings.js and the node_modules directory that receives installed nodes.
Node-RED looks for settings.js here when it starts and falls back to built-in defaults when the file is absent, so its presence marks the directory this instance actually reads. Confirm the directory from the startup log rather than from your own profile: the log prints the user directory in its first lines, right after the Node-RED and Node.js versions. A preinstalled Node-RED on an industrial PC often runs as a service under an account nobody logs in with, and that account's profile holds the directory that matters. One Windows behavior has been reported against Node-RED itself: when the default .node-red directory exists and contains a settings.js, the runtime has been reported loading it even where userDir is set to a different path. Trust the log line over the configuration.
How do I stop and restart Node-RED on a Windows host? #
Close the console window running it or stop the Windows service that launches it, run the install, and start it again only after npm finishes — Node-RED scans node_modules for node packages when it starts, never while running.
How the instance runs decides how you stop it. One started from a command prompt with node-red dies when you press Ctrl+C or close that window. A preinstalled service survives logoffs, so stop it from the Windows service list before npm touches node_modules, because a running process can hold files open that npm needs to replace. On restart, read the log from the top: the Node-RED version, the Node.js version and the user directory all appear in the first lines, and any load error for the new package appears below them.
Should I copy the package folder into node_modules or run npm install? #
Run npm install from the user directory — a bare copy of the package folder into node_modules skips the package's dependencies, and that missing set is the usual cause of a vendor node that never appears in the palette.
The package's package.json lists every module the node needs at load time. npm reads that list, fetches what the host lacks and places everything in the user directory's node_modules tree, so Node-RED can load the node file and everything behind it. A copied folder arrives alone: the first missing dependency fails the load, the startup log shows a module-not-found error naming a dependency instead of the vendor package, and the node never registers. The copy also skips the engines check npm performs at install, so a runtime mismatch surfaces later as a load error on a live flow instead of as an install warning.
How do I check a package's Node.js version requirement before installing? #
Read the engines entry in the package's package.json — an example value such as ">=18" demands Node.js 18 or newer — and compare it with what node --version prints on the host; a lower major version means upgrading the runtime first.
npm compares the running runtime against engines during install and prints an EBADENGINE warning when the runtime does not satisfy it. That warning does not stop the install by default, so the real failure can arrive later as a Node-RED load error. Worked comparison: a host printing v16.13.0 sits on major version 16, and 16 is less than the example demand of 18, so the runtime is upgraded before the node installs. The vendor may also name a tested Node-RED release in the package documentation; treat that as a requirement too and compare it against the version the startup log prints.
How do I verify the node installed correctly after the restart? #
Check two places: npm's summary line from the install, and the Manage palette's Nodes tab in the editor, which must list the package name you recorded from package.json.
npm ends a successful install with a package count. Worked example: the package's package.json lists three dependencies, none present on the host, so npm fetches all three plus the package itself and prints added 4 packages — the arithmetic is 1 vendor node plus 3 dependencies, which is 4. A line reading up to date means npm installed nothing and points at a path that resolved to a copy already present; ENOENT naming the path means npm never found the package where the command said it was.
In the editor, open the menu, choose Manage palette, and read the Nodes tab for the recorded name. Then drag the node from the palette sidebar beside an inject node wired to a debug node, deploy, and click the inject: a payload arriving in the debug pane proves the node executes, not merely that it loaded.
Why is the node still missing from the Manage palette? #
Either npm installed into a different user directory than the one this Node-RED instance reads, or a dependency failed to load and the node never registered — the startup log distinguishes the two within its first screen.
Work down this order. First, compare the user directory line in the startup log with the directory you ran npm in: both the service-account mismatch and the Windows preference for an existing default .node-red directory with a settings.js produce a clean install that this instance never sees, so re-run npm install from the directory the log names. Second, read any module-not-found error: rerunning npm install resolves it, or install the module it names explicitly. Third, if the Nodes tab lists the package but no node type appears in the sidebar, confirm with the vendor that the package is the node itself and not the template half of a how-to bundle, which installs nothing.
For failures inside the palette manager itself, or flows that vanish around a palette change, the Manage palette troubleshooting guide covers those separately. A node that worked and later vanished is a different failure; why S7 nodes disappear from the Node-RED palette walks that case.
Can I install a vendor node on a plant PC with no internet connection? #
Only if the package carries its own dependencies, because npm install of a local package still resolves the dependencies named in its package.json from the npm registry, and an offline host fails with fetch errors naming each missing module.
Two paths work. Ask the vendor whether the dependencies ship inside the package; when they do, npm install completes without touching the registry and the offline host installs cleanly. When they do not, build the install on a connected machine with the same runtime versions and move the completed node_modules content across, or follow a pinned offline procedure — installing vendor Node-RED nodes offline on an industrial PC documents that method. Behind a corporate proxy the failure has a shape of its own; the InfluxDB node install failing in Node-RED behind a proxy shows it. The decision: if the dependencies do not ship with the package and the host stays offline, the pinned offline route is the only one — never hand-copy the node folder and hope.
Does the same install method work on a Linux edge box? #
Yes — the steps are identical: stop Node-RED, run npm install with the package path from the user directory, restart and verify in the Manage palette; on Linux that directory is ~/.node-red for the account running Node-RED, or /var/lib/node-red/.node-red on a system-packaged install.
The differences are the shell and the account: run npm as the user that owns the user directory — on a system-packaged install that is the service user, and the packaged settings.js sits at /var/lib/node-red/.node-red/settings.js. Verification is the same, from the startup log's user directory line to the Nodes tab and a deploy-and-click test in the editor. For a Linux box with no Node-RED yet, installing Node-RED natively on a Linux edge computer covers the runtime first. The decision is unchanged: npm from the directory the instance reads, never a bare copy.
Questions asked
How do I remove a locally installed Node-RED node again?
Stop Node-RED, open a command prompt in the same user directory you installed from, and run npm uninstall with the package name recorded from package.json. npm deletes that package's folder from node_modules. Start Node-RED again and confirm the entry is gone from the Manage palette's Nodes tab. A flow that used the node shows an unknown placeholder until you rewire or redeploy it.
Can I install several local node packages in one command?
Yes. npm install accepts more than one path in a single run, for example two tgz files from the same downloads folder, and it resolves each package's dependencies the same way. Run it from the user directory, then restart Node-RED and check both package names on the Manage palette's Nodes tab.
Why does the Manage palette's Install tab not find a local package?
That tab searches the npm registry by package name and version, so it can only download what the registry holds. A vendor package that arrives as a folder or tgz file on disk is invisible to it. Install it with the npm install command and the local path from the user directory, as the main procedure shows.
Does installing a local node package change my existing flows?
No. The install writes only into node_modules under the user directory; flows.json is untouched and running flows keep running. The new node appears in the palette sidebar for you to wire in and deploy. One caution: if npm changes a shared dependency version that another installed node relies on, that node can fail at the next restart, so read the startup log.