Is not recognized as an internal or external command operable program or batch file in npm start?

The npm (Node Package Manager) application is a package manager for the JavaScript language that allows you to install JavaScript libraries or modules by using the npm install command.

npm is bundled together with NodeJS, so each time you install a specific version of NodeJS on your local computer, you will also have a specific version of npm bundled with it.

You can check the currently installed npm version using the npm --version command:

But sometimes, you may encounter the npm is not recognized error as shown below:

> npm --version 'npm' is not recognized as an internal or external command, operable program or batch file.

The error above happens when the Windows operating system doesn’t know what to do with the npm command.

To fix the error, you need to make sure that the Node executable file is available under your PATH setting.

Note: NodeJS should have added the executable location to your PATH variable during installation process, but sometimes it may fail to do so.

You can add new entry to the Windows PATH environment variable using the Command Prompt as follows:

> SET PATH=C:\Program Files\Nodejs;%PATH% > npm

Or you can set the PATH variable by using Windows graphical UI.

The following steps will help you to fix the error from Windows interface.

Fixing npm is not recognized error on Windows OS

First, Go to My Computer or This PC for Windows 10. Right-click on empty space and open the Properties window:

Click Advanced system settings from the left bar of the Properties window:

Now you’re in the System Properties window. Click the Environment Variables... button:

Now you’re in the Environment Variables window. Select the Path variable from either the User Variables or System Variables table and click on the Edit... button:

At the end of the variable values, add C:\Program Files\nodejs as a new entry to your Path variable:

If you installed NodeJS on another location, then you need to change the entry to your custom location. Remember to always enter the absolute path from the drive letter to your NodeJS program folder.

Once done, click OK and open a new Terminal or Command Line window. If you’re calling npm from the VSCode terminal, you need to restart VSCode first before trying again.

The npm is not recognized error should be fixed and you should be able to check this using the npm --version command:

If you still get the error, then try restarting your computer first. The error should be gone after you restart.

Now you should be able to install any npm package to your local computer with npm install command. Great job on fixing the error!

Related articles:

  • The npm install -s flag explained
  • Using npm install with -g flag explained
  • Using npm init with -y flag explained
  • Creating development dependencies with npm install -D command
  • Why and how to clear npm cache

Hii team 

This is my work

npm start > start C:\Users\07\OneDrive\Desktop\Final Try\fabcar-blockchain-sample\web-app\server > ./node_modules/nodemon/bin/nodemon.js src/app.js

I'm getting this error

'.' is not recognized as an internal or external command, operable program or batch file. npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! start: `./node_modules/nodemon/bin/nodemon.js src/app.js` npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the start script. npm ERR! This is probably not a problem with npm. There is likely additional logging output above. npm ERR! A complete log of this run can be found in: npm ERR! C:\Users\07\AppData\Roaming\npm-cache\_logs\2020-05-04T13_24_08_021Z-debug.log '.' is not recognized as an internal or external command,.Here, in this I'm following the basic edureka tutorial. But I'm geting error as "'.' is not recognized as an internal or external command".

How to solve this error?

Is not recognized as an internal or external command operable program or batch file in npm start?
May 5, 2020 in Blockchain by
• 37,500 points
6,791 views

1 answer to this question.

Hello @kartik,

Edit package.json and remove the ./.

Change

"start": "./node_modules/nodemon/bin/nodemon.js src/app.js"

to

"start": "nodemon src/app.js"

Alternatively, you can try:

npm install -g nodemon

and change the start command to

"start": "./node_modules/nodemon/bin/nodemon.js src/app.js"

Thank You!!

Is not recognized as an internal or external command operable program or batch file in npm start?
answered May 5, 2020 by Niroj
• 82,740 points

  • All categories
  • Is not recognized as an internal or external command operable program or batch file in npm start?
    Apache Kafka (84)
  • Is not recognized as an internal or external command operable program or batch file in npm start?
    Apache Spark (596)
  • Is not recognized as an internal or external command operable program or batch file in npm start?
    Azure (131)
  • Is not recognized as an internal or external command operable program or batch file in npm start?
    Big Data Hadoop (1,907)
  • Is not recognized as an internal or external command operable program or batch file in npm start?
    Blockchain (1,673)
  • Is not recognized as an internal or external command operable program or batch file in npm start?
    C# (122)
  • Is not recognized as an internal or external command operable program or batch file in npm start?
    C++ (228)
  • Is not recognized as an internal or external command operable program or batch file in npm start?
    Career Counselling (1,060)
  • Is not recognized as an internal or external command operable program or batch file in npm start?
    Cloud Computing (3,356)
  • Is not recognized as an internal or external command operable program or batch file in npm start?
    Cyber Security & Ethical Hacking (145)
  • Is not recognized as an internal or external command operable program or batch file in npm start?
    Data Analytics (1,266)
  • Is not recognized as an internal or external command operable program or batch file in npm start?
    Database (525)
  • Is not recognized as an internal or external command operable program or batch file in npm start?
    Data Science (73)
  • Is not recognized as an internal or external command operable program or batch file in npm start?
    DevOps & Agile (3,500)
  • Is not recognized as an internal or external command operable program or batch file in npm start?
    Digital Marketing (111)
  • Is not recognized as an internal or external command operable program or batch file in npm start?
    Events & Trending Topics (28)
  • Is not recognized as an internal or external command operable program or batch file in npm start?
    IoT (Internet of Things) (387)
  • Is not recognized as an internal or external command operable program or batch file in npm start?
    Java (1,122)
  • Is not recognized as an internal or external command operable program or batch file in npm start?
    Kotlin (3)
  • Is not recognized as an internal or external command operable program or batch file in npm start?
    Linux Administration (384)
  • Is not recognized as an internal or external command operable program or batch file in npm start?
    Machine Learning (337)
  • Is not recognized as an internal or external command operable program or batch file in npm start?
    MicroStrategy (6)
  • Is not recognized as an internal or external command operable program or batch file in npm start?
    PMP (423)
  • Is not recognized as an internal or external command operable program or batch file in npm start?
    Power BI (516)
  • Is not recognized as an internal or external command operable program or batch file in npm start?
    Python (3,137)
  • Is not recognized as an internal or external command operable program or batch file in npm start?
    RPA (650)
  • Is not recognized as an internal or external command operable program or batch file in npm start?
    SalesForce (92)
  • Is not recognized as an internal or external command operable program or batch file in npm start?
    Selenium (1,569)
  • Is not recognized as an internal or external command operable program or batch file in npm start?
    Software Testing (56)
  • Is not recognized as an internal or external command operable program or batch file in npm start?
    Tableau (608)
  • Is not recognized as an internal or external command operable program or batch file in npm start?
    Talend (73)
  • Is not recognized as an internal or external command operable program or batch file in npm start?
    TypeSript (123)
  • Is not recognized as an internal or external command operable program or batch file in npm start?
    Web Development (2,747)
  • Is not recognized as an internal or external command operable program or batch file in npm start?
    Ask us Anything! (66)
  • Is not recognized as an internal or external command operable program or batch file in npm start?
    Others (899)

Subscribe to our Newsletter, and get personalized recommendations.

Already have an account? Sign in.

How do I fix npm is not recognized as an internal or external command?

npm is not recognized as internal or external command operable program or batch file. I figured out that node js is installed in C:\Program Files\nodejs. Opening a command prompt in this directory makes npm work fine.

Is not recognized as an internal or external command operable program or batch file npm run server?

To solve the error "'concurrently' is not recognized as an internal or external command, operable program or batch file", install the package globally by running npm install -g concurrently , restart your terminal and make sure your PATH environment variable is set up correctly.

Is not recognized as an internal or external command node?

Two of the main reasons due to which you can encounter the above-mentioned error are: Node. js is not installed on your system. Environment variables are incorrectly set.

Why npm is not working in CMD?

The npm command not found error First, you need to make sure that npm is installed on your computer. npm is bundled with Node. js server, which you can download from the nodejs.org website. Once you downloaded and installed Node.