简体   繁体   中英

Cordova CLI command returns nothing even “cordova --version”, installation issue?

Recently, I needed to try developing a cordova application. I installed android studio with no problem. Then I went on for Nodejs. I got Nodejs 6.0 installed on my Windows 7 system.

It worked fine. Then I tried to install cordova with npm command :

npm install -g cordova

It seemed finally ok. The verbose message appeared and the graphical text displayed the folder structure of the installed components, which I thought, this tells me the success install.

When I typed node --version , it showed 6.0.0 , the nodejs has been installed correctly.

Then I typed npm --version , it showed 3.8.8 . So npm works ok.

After that, I typed cordova --version to validate the installation, it seemed to fetch something for a little while and return the prompt without printing anything or even its version.

I took another try, I typed cordova help . Same thing, there's nothing happen. It just failed or got error somehow silently.

I removed cordova with npm uninstall -g cordova , and tried install again to eventually get the same result. I even tried to remove nodejs and re-install all over again but no luck.

Is there anyone out there faced the same to me? And how did you solve this problem? Any idea?

  1. Make sure this is in your System Path (under : PC -> Properties -> Advanced System Settings -> Environment Variables )

    C:\\Users\\ Your User \\AppData\\Roaming\\npm

  2. Try to close and re-open your command prompt ;)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM