ionic

‘ionic’ is not recognized as an internal or external command

This tutorial guides you how to resolve error ‘ionic’ is not recognized as an internal or external command, operable program or batch file when you run ionic CLI commands.

Resolve ‘ionic’ is not recognized command error

First, you need to check whether npm path “;C:\Users\{username}\AppData\Roaming\npm”  was added there in Path environment variable value as shown below.

C:\Users\sneppets>echo %PATH%

C:\Program Files\Java\openjdk-9.0.4\bin;.;C:\Program Files\apache-maven\bin;.;C:
\Program Files\WSO2\EnterpriseIntegrator.4.0\bin;.;C:\Windows\System32;.;C:\Pr
ogram Files\nodejs\;C:\Users\sneppets\AppData\Roaming\npm

If npm path is missing in Path environment variable value, then you need to add it to resolve this issue.

npm-install

You need to follow the below steps to get Ionic CLI command working.

  • Install Node.js
  • Once you are done with Node.js installation verify the Path environment variable value to confirm npm path is added in the Path environment variable value.
  • Install Ionic and Cordova using the following command.

> npm install -g cordova ionic

When you run npm install command with no arguments, this command install the dependencies in the local node_modules folder.

When you append -g to the npm install command as shown above, it installs dependencies in global mode i.e., it installs the current packages as a global package, so that you can access from any directory.

By default, npm install will install all modules listed as dependencies in package.json.

Also Read:

References:

Subscribe
Notify of
guest

0 Comments
Inline Feedbacks
View all comments