Skip to contentWe move your site for free: work worth ₪1,999 + VAT, for a limited time
DeployAI
Node.js

npx not recognized? How to install Node.js on Windows and Mac

Your terminal says npx or node is not found? Node.js is missing. Install the LTS version on Windows or Mac in five minutes, check it works and get back to your agent.

7 minute read

A terminal window where node -v and npx -v print version numbers, beside the title how to install Node.js on Windows and Mac.

Node.js is a free program that lets your computer run the small tools a coding agent uses, like npx deployai@latest. If your terminal says npx is not found or not recognized, Node.js is missing. Install the LTS version from nodejs.org, close the terminal, open a new one and type node -v. It takes about five minutes, and you never have to learn JavaScript to use it.

Why you need Node.js at all

A coding agent works by typing commands in a terminal for you. Many of those commands start with npx, which downloads a small tool, runs it and leaves nothing behind. Putting a site live with us is one of them: the agent runs npx deployai@latest check, then a deploy command, and your site gets its address.

npx comes with Node.js. Without Node.js the computer does not know the word, so the very first command stops. Nothing is broken in your site or your agent. One program is missing from the computer, and you only install it once.

Node.js does not change your site, it does not run in the background, and it does not open anything to the internet. It sits on your computer until a command asks for it.

How to know if it is missing

Open a terminal and type:

node -v

If you see a version number, like v24.11.0, Node.js is installed and you can skip to checking that it works. If you see one of these messages, it is missing:

WhereWhat the message says
Windows PowerShellThe term 'node' is not recognized as the name of a cmdlet
Windows Command Prompt'node' is not recognized as an internal or external command
Maczsh: command not found: node

The same message with npx in place of node means the same thing.

How to open a terminal. On Windows, press the Start key, type PowerShell and press Enter. On a Mac, press Command and Space, type Terminal and press Enter. If you work with a coding agent, it has its own terminal and you will see the message in its window.

Install it on Windows

There are two safe ways. Pick one.

With the installer

  1. Go to nodejs.org. The page shows the version marked LTS, which means long term support. Always take that one.
  2. Download the Windows installer (the file ends with .msi) and open it.
  3. Click Next on each screen and keep the default choices. You can leave the box about extra tools unticked.
  4. When it finishes, close every terminal window you have open, including the one inside your coding agent.

With one command

Windows 10 and 11 come with a tool called winget. Open PowerShell and type:

winget install OpenJS.NodeJS.LTS

Answer yes if Windows asks for permission. When it is done, close the terminal and open a new one.

If PowerShell says running scripts is disabled

Some Windows computers block small scripts by default, and then npx answers with npx.ps1 cannot be loaded because running scripts is disabled on this system. Node.js is installed. Windows is only being careful. Type this once in PowerShell to allow scripts you run yourself:

Set-ExecutionPolicy -Scope CurrentUser RemoteSigned

It changes the setting for your user only. Then try again.

Install it on a Mac

  1. Go to nodejs.org and take the LTS version.
  2. Download the macOS installer (the file ends with .pkg) and open it.
  3. Follow the steps. The Mac asks for your password, because the program is installed for the whole computer.
  4. Close the Terminal window and open a new one.

If you already use Homebrew, brew install node works too. If you have never heard of Homebrew, use the installer: it is the shorter way.

Install it on Linux

The easiest way on Linux is nvm, a small free tool from GitHub that installs Node.js in your own folder. It needs no password and always gets the current LTS version. Type these two lines in a terminal:

curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.41.0/install.sh | METHOD=script bash
. ~/.nvm/nvm.sh && nvm install --lts

The same two lines work on a Mac too, if you prefer them to the installer. Avoid the version your distribution's package manager offers: it is often too old for today's tools. Then check with node -v as in the next section.

Check that it works

Open a new terminal and type both lines:

node -v
npx -v

Each one should print a version number. If both do, you are ready. Go back to your coding agent and ask it to try the last step again, or copy your instructions from the go live page once more.

If the terminal still says the command is not found, the window you are using was open before the install. A terminal reads the list of programs only when it starts, so close it and open a new one. In a coding agent, close the whole app and open it again. If that does not help, restart the computer.

Can my agent install it for me

Yes, and that is the shortest way. When the agent sees that npx is missing, our instructions tell it to say so in one sentence, send you this guide and ask you with a button before it installs anything. If you say yes, it installs Node.js by itself, with the same commands this guide shows: winget on Windows, nvm on a Mac or Linux. On Windows, a window asks you to approve the install, so stay close and click Yes. On a Mac or Linux nothing asks you anything.

Then the agent makes Node.js work in the same session and goes on with your site. You do not need to close anything. If the install fails, for example on a work computer, the agent tells you in one sentence and stops, and the work computer section below explains what to do.

Never let anyone, a person or an agent, install Node.js from a link that is not nodejs.org, winget, Homebrew or nvm on GitHub. A copy from another site can carry something you did not ask for.

A work computer

A computer from your workplace may not let you install programs. The installer then stops with a message about administrator rights, or winget asks for a password you do not have. Do not try to get around this: ask the person who looks after computers at work to install the LTS version of Node.js from nodejs.org. It is a well known program and most of them have installed it before. Until then, you can put the site live from the browser, as the next sections explain.

Which version to pick

Pick the version marked LTS. It gets fixes for a long time and every common tool works with it. The other version on the download page, called Current, has the newest features and changes more often, which you do not need.

If you installed Node.js years ago, it may be too old for today's tools. Our tool needs version 22.12 or newer, and it says so in plain words when yours is older. Install the LTS version over the old one, the same way as above, and it replaces the old one.

nvm, the tool from the Linux section, can also keep several versions side by side. You do not need that to put a site live.

No Node.js and no agent

You do not need Node.js to put a site live with us. On the go live page you can drop the folder of your site into the browser, and we build and publish it for you. Node.js is only for working with a coding agent, which is the faster way when you change your site often.

In short

  1. Type node -v in a terminal. A version number means you are done.
  2. If it is missing, let your agent install it when it asks, or install the LTS version from nodejs.org yourself.
  3. Close the terminal and open a new one, then check node -v and npx -v again.
  4. Go back to your agent and ask it to try again.

Next step: put your site live, and when it is live, let Google and Bing know about it.

Questions

What is Node.js and why does my coding agent need it?

Node.js is a free program that runs small tools on your computer. A coding agent runs commands that start with npx, and npx only comes with Node.js.

What do I do when it says npx is not recognized?

Node.js is missing. The easiest way is to let your coding agent install it when it asks: it installs it and goes on. You can also install the LTS version from nodejs.org yourself, open a new terminal and check with node -v.

I installed it and the command is still not found. Why?

The terminal was open before the install and does not know the new program yet. Close it and open a new one. In a coding agent, close the whole app and open it again.

Is it safe to install Node.js?

Yes, as long as it comes from nodejs.org, winget, Homebrew or nvm on GitHub. Do not install it from a link on any other site.

Can I put a site live without Node.js?

Yes. On the go live page you drop your site's folder into the browser, and we build and publish it. Node.js is only needed to work with a coding agent.

Site ready? It can be live in a minute.

Go live now

More guides