When working on React projects, it’s important to know which version of React your project is using. Whether you are debugging an issue, updating dependencies, or ensuring compatibility with a new library, checking your React version can save you from unexpected errors later.
If you are using a Windows system, the good news is that you can find your React version easily using the Command Prompt (CMD).
In this guide, we will walk you through a few simple methods to quickly and accurately check the React version.
Also Read: How to Check Angular Version in Windows CMD?
Why Do You Need to Know Your React Version?
Before diving into the steps, let’s understand why this matters:
➔ Library compatibility: Some third-party packages only support specific versions of React.
➔ Upgrade planning: Knowing your current version helps you plan safe updates.
➔ Debugging: Many issues depend on version-specific features or syntax.
➔ Documentation: Following the correct version of the React documentation helps avoid confusion.
So, keeping track of your React version helps you maintain a stable and predictable development environment.
Also Read: Guide to Check MongoDB Version in Windows CMD
Methods to Check React Version in CMD
➢ Method 1: Check React Version Using Command Prompt
This is the most direct way to find out the version installed in your project.
Here’s how to check your SQL Server version:
➔ To open Windows CMD, press ‘Windows Key + R’ on your keyboard.
➔ A dialog box will open. In that, Type ‘cmd’ in it & press ‘Enter.’ This will open the Command Prompt window.
➔ Now, navigate to the directory where your React project is located.
For example, if your project is in the Documents folder:
| cd Documents\my-react-app | Copied!
(Replace “my-react-app” with your actual project folder name.)
➔ Now, you have to type the npm command to see which packages are currently installed in your project and what versions are being used.
| npm list react | Copied!
You will see an output like this:

Here, react@16.3.0 shows that the version of React installed in your project is 16.3.0.
Also Read: Guide to Check PHP Version in Windows CMD
➢ Method 2: Check React DOM Version
React usually comes with another package called react-dom that helps render your React components to the DOM.
➔ To check its version, run:
| npm list react-dom | Copied!
You will get a similar output showing:

Both versions (React and React DOM) are typically the same in most projects.
Also Read: Guide to Check Node Version in Windows CMD
➢ Method 3: Check React Version via package.json File
If you prefer not to use CMD, you can also check your version directly from the package.json file.
Here’s how:
➔ Go to your project directory.
➔ Open the file named package.json (you’ll find it in the root folder).
➔ Look for the following lines:

The number after “react” indicates your current React version.
This method is useful if you’re editing or managing your project files directly.
➢ Method 4: Use npx to Check React Version
Another quick method is using npx, which allows you to execute npm packages directly.
You have to run this command:
| npx react -v | Copied!
If this command doesn’t return a version, it’s because React CLI isn’t globally installed. In that case, you can rely on the npm list react command or the package.json file.
Also Read: How can you connect to a Remote Desktop using CMD?
Common Errors You Might Encounter
1. “React not found” or “Empty result”
This usually means you’re not inside your project folder. Make sure you use the cd command to navigate to the correct directory before running npm commands.
2. npm not recognized
If you see this, Node.js might not be installed or not added to your system’s PATH. Install Node.js from the Node.js website and then restart the Command Prompt.
Conclusion
And that’s it!
You now know multiple ways to check your React version using Windows Command Prompt. The quickest method is to use ‘npm list react’, but you can also peek into your ‘package.json’ file or use ‘npx’ if needed.
Keeping track of your React version ensures smooth updates, better compatibility, and fewer bugs in your development workflow. So next time you clone a project or face an issue, you will know exactly where to look!
