Ionic Framework is useful for building mobile apps like Android and iOS. This article will help you to install Node.js, Cordova and Ionic framework on your Ubuntu 18.10, 18.04 and 16.04 LTS system.

Advertisement

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 Ubuntu and debian systems.

sudo apt-get install python-software-properties
curl -sL https://deb.nodesource.com/setup_12.x | sudo -E bash -
sudo apt-get install nodejs

Step 2 – Install Cordova

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 cordova

Step 3 – Install Ionic Framework

Ionic provides and commands line utility for creating packages, build and start applications. Use NPM command to install the Ionic framework on your system.

sudo npm install -g @ionic/cli

After completing the installation of the Ionic framework, use the following command to check the installed version.

ionic -v

6.10.1

Step 4 – Create Application with Ionic

Now, You need to create a new Cordova project on your computer using the following command.

ionic start HelloWorld blank

Now use one of the following commands to enable iOS or Android platform. iOS platform will work on MacOS only.

ionic platform add ios
ionic platform add android

For more details visit http://ionicframework.com/docs/guide/installation.html

Share.

7 Comments

  1. This is an error with node-saas solve installing npm or node-saas with “–unsafe-perm”

    Example: $ sudo npm install –unsafe-perm –no-cache

    Cheers.

  2. hi,

    i get this
    gyp ERR! configure error
    gyp ERR! stack Error: EACCES: permission denied, mkdir
    ‘/home/wesley/HelloWorld/node_modules/node-sass/.node-gyp’
    gyp ERR! System Linux 4.14.0-3-amd64
    gyp ERR! command “/usr/bin/node” “/home/wesley/HelloWorld/node_modules/node-gyp/bin/node-gyp.js” “rebuild”
    “–verbose” “–libsass_ext=” “–libsass_cflags=” “–libsass_ldflags=” “–libsass_library=”
    gyp ERR! cwd /home/wesley/HelloWorld/node_modules/node-sass
    gyp ERR! node -v v8.9.3
    gyp ERR! node-gyp -v v3.7.0
    gyp ERR! not ok
    Build failed with error code: 1
    npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.4 (node_modules/fsevents):
    npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.4: wanted
    {“os”:”darwin”,”arch”:”any”} (current: {“os”:”linux”,”arch”:”x64″})

    npm ERR! code ELIFECYCLE
    npm ERR! errno 1
    npm ERR! node-sass@4.9.0 postinstall: `node scripts/build.js`
    npm ERR! Exit status 1
    npm ERR!
    npm ERR! Failed at the node-sass@4.9.0 postinstall 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! /root/.npm/_logs/2018-06-12T17_18_50_981Z-debug.log

    • This is an error with node-saas solve installing npm or node-saas with “–unsafe-perm”

      Example: $ sudo npm install –unsafe-perm –no-cache

      Cheers.

  3. these commands are a little confusing to me, please explain some more for me , I’m very new to the coding world,I’m a student i started learning programming and web developing 2 months ago,short course thanks.

Exit mobile version