npm for 9Router: packages, versions, and paths
Understand how npm installs the 9Router package, check Node and executable paths, inspect package provenance, and keep upgrades separate from router data.
npm is the package manager used to install 9Router’s published Node.js package. It downloads software and makes its command available; it does not supply model access, provider credits, or a running server by itself. If you already have Node and want the exact installation sequence, use npm install for 9Router.
Understand the three names
Node.js runs the JavaScript application. npm manages its packages. 9router is the published package and command you intend to install. Check them separately:
node --version
npm --version
npm view 9router name version repository.url engines
The last command reads registry metadata without installing the package. Compare the repository field with the upstream project. Do not choose a similarly named package because its search description sounds right. Package metadata helps establish identity, but it is not a security audit of the package contents.
Global and local installations serve different purposes
A global installation makes a command available through npm’s configured executable location. A local installation writes dependencies into the current project’s node_modules and updates its package metadata where appropriate. Running a bare npm install inside the 9Router source repository installs that project’s dependencies, not the globally published CLI.
| Command | Meaning |
|---|---|
npm view 9router version | Read the currently published version |
npm list -g 9router --depth=0 | Inspect the installed global package |
npm prefix -g | Find the global installation prefix |
npm install -g 9router | Install the published CLI globally |
npm install inside a checkout | Install that checkout’s dependencies |
Do not mix these workflows when diagnosing a problem. A terminal might run a global executable even while your current directory contains a newer source checkout.
Why can npm see the package while the shell cannot?
Package installation and command lookup are separate. Your shell must include the executable location in PATH. Node version managers can also give each runtime version its own global packages. After switching Node versions, the old installation may still exist but no longer be the one your shell uses.
On macOS or Linux, inspect command resolution with command -v node, command -v npm, and command -v 9router. On Windows, use where.exe node, where.exe npm, and where.exe 9router. Compare those paths with the runtime and prefix you intended to use. Reopen the terminal if an installer updated the environment after the shell started.
Package version is not the running server version
npm view reads the registry, npm list -g reads this runtime’s global installation, and command -v 9router (or Windows where.exe 9router) resolves the command your shell will launch. None proves which version an already running process loaded. After changing Node or packages, identify the intended process and restart it deliberately before attributing behavior to the new version.
A lockfile in a local project records that project’s dependency resolution. It does not pin a separately installed global CLI. A source checkout has its own commit and build output; report those separately from the published package version.
Where to go for the next task
For concrete PATH, EACCES, registry and port repairs, use npm install and error fixes. For data locations, backups and updates, use installation and persistence. Package files and persistent provider settings have different lifecycles; reinstalling a CLI is not a database backup or a guaranteed settings reset.
References for this guide
Steps were checked against the linked documentation and source. Provider access and model availability depend on your account. We do not claim a completed live model test unless explicitly stated.