Facebook Twitter Instagram
    TecAdmin
    • Home
    • Ubuntu 20.04
      • Upgrade Ubuntu
      • Install Java
      • Install Node.js
      • Install Docker
      • Install LAMP Stack
    • Tutorials
      • AWS
      • Shell Scripting
      • Docker
      • Git
      • MongoDB
    • FeedBack
    • Submit Article
    • About Us
    Facebook Twitter Instagram
    TecAdmin
    Home»Programming»Nodejs»How to Install Cordova on Fedora 32/31/30

    How to Install Cordova on Fedora 32/31/30

    RahulBy RahulMay 22, 20182 Mins ReadUpdated:May 8, 2020

    Apache Cordova is an open-source mobile development framework. It allows you to use standard web technologies such as HTML5, CSS3, and JavaScript for cross-platform development, avoiding each mobile platforms’ native development language. Apache Cordova command-line requires Node.js to run and available on NPM.

    • Recommended: Setup Ionic Framework on Ubuntu, Debian, and LinuxMint for open-source SDK for hybrid mobile app development

    Step 1 – Installing Node.js

    First, use the following commands to install NPM and Node.js on your system. In below commands, the first command will install some required packages on the system. The second command will add PPA for node.js to your system. After that update, your all attached PPA and last command will install Node.js and NPM on your system.

    You can visit our tutorial to install latest Node.js on Fedora systems.

    sudo dnf install -y gcc-c++ make
    curl -sL https://rpm.nodesource.com/setup_12.x | sudo -E bash -
    sudo dnf install nodejs
    

    Step 2 – Install Cordova on Fedora

    Now use the following command to install Cordova on your system using npm command. It will install all other required node modules on your system.

    sudo npm install -g [email protected]
    

    Step 3 – Check Cordova Version

    After successful installation of Cordova on your system, Use the following command to check Cordova version.

    cordova --version
    
    9.0.0 ([email protected])
    

    Step 4 – Create Application with Cordova

    Use the Cordova command to create your Application. Execute the below command to create an application with name myapp. You can change the name on yours.

    cordova create myapp
    

    Now add the required platform in your application. This will create required files for the corresponding platform under the platforms/android and platforms/ios directories.

    cordova platform add ios
    cordova platform add android
    

    Use below command to list the installed and available platforms for Cordova application.

    cordova platform -ls 
    
    Installed platforms:
      android 7.0.0
      ios 4.5.4
    Available platforms:
      browser ~5.0.1
      osx ~4.0.1
      windows ~5.0.0
      www ^3.12.0
    

    If you accidentally added any platform which you no longer needs, just remove that using commands like below.

    cordova platform remove ios
    cordova platform remove android
    

    Step 5 – Build Cordova Application

    Before building a Cordova application, make sure that the system fulfills all the requirements for your build environment.

    cordova requirements
    

    On all requirements completed successfully run the build command to build your application.

    cordova build              ## Build all added platforms 
    cordova build android      ## Build for specific platform 
    
    cordova NodeJs
    Share. Facebook Twitter Pinterest LinkedIn Tumblr Email WhatsApp
    Previous ArticleHow To Configure Auto-Login for Windows 7
    Next Article How to Install Memcached on Debian 10/9/8

    Related Posts

    How To Install NVM on Ubuntu 22.04

    Updated:April 16, 20223 Mins Read

    How To Install NVM on Windows

    Updated:April 16, 20223 Mins Read

    How To Install Node.Js on Debian 11

    Updated:February 11, 20226 Mins Read

    How To Install NVM on Debian 11

    Updated:August 31, 20213 Mins Read

    How To Use Environment Variables in Node.js

    6 Mins Read

    How to Parse Command Line Arguments in Node.js

    5 Mins Read

    3 Comments

    1. Jorge on May 28, 2018 12:50 am

      I found a way to improve an error, because your post is a little bit wrong at the beginning:
      apt-get is JUST for DEB based systems, so you have to run:
      # dnf install npm
      then
      # npm -g install cordova
      # npm -g install [email protected] #in rpm based systems this is a MUST
      so you can run this one command:
      # cordova -v

      Reply
      • Rahul K. on May 28, 2018 4:31 am

        Thanks Jorge. I have corrected the commands for Cordova and nodejs installation on Fedora.

        Reply
    2. Jorge on May 28, 2018 12:17 am

      apt-get is from deb package based dude, and it wont work. You have to run:
      $ sudo dnf install nodejs
      then when you try to run
      $ sudo npm -g install cordova
      it wont install correctly cordova.

      Reply

    Leave A Reply Cancel Reply

    Recent Posts
    • What is CPU? – Definition, Types and Parts
    • What is the /etc/aliases file
    • What is the /etc/nsswitch.conf file in Linux
    • How to Install Ionic Framework on Ubuntu 22.04
    • What is the /etc/hosts file in Linux
    Facebook Twitter Instagram Pinterest
    © 2022 Tecadmin.net. All Rights Reserved | Terms  | Privacy Policy

    Type above and press Enter to search. Press Esc to cancel.