How to install Cordova correctly?
Solution 1:
I have read different resource and found decision which works for me:
Install Cordova in these steps with dependencies: Installing Node.js. Node.js may already be installed. To test the installation, open a terminal window and type:
nodejs --version
If the version number is displayed, Node.js is installed. If Node.js is not installed, install with:
sudo apt-get install nodejs
Also add the alias "node
" for nodejs, as this is needed by Cordova:
sudo ln -s /usr/bin/nodejs /usr/bin/node
Install Node Package Manager (npm). Test if npm
is installed by typing:
npm --version
If npm
is not installed, install with:
sudo apt-get install npm
Installing Git. Git is a version control system, which is used by Cordova behind-the-scenes. Test if Git is installed by typing:
git --version
If Git is not installed, install with:
sudo apt-get install git
Installing Cordova. Cordova is installed using the Node Package Manager (npm). Type the following to install:
sudo npm install -g cordova
My test the Cordova install by typing:
$ cordova --version
7.0.1
If you see the version number, you have successfully installed Apache Cordova!
that leaves the issue with requirements ... you don't have java jdk installed ! other requirements also not installed that ends with no usage of cordova .. :(
ANDROID_SDK_ROOT=undefined (recommended setting) ANDROID_HOME=undefined (DEPRECATED) Failed to find 'ANDROID_SDK_ROOT' environment variable. Try setting it manually. Failed to find 'android' command in your 'PATH'. Try update your 'PATH' to include path to valid SDK directory.