How To Install Different Ionic versions in One Environment.

Ionic install for different node versions One Environment.  Or Install and Build in different node versions in ONE ionic Project.


if you have error like

  • Ionic node version issues
  • Ionic npm version issues
  • Ionic certificate has expired issues.
ex: certificate issue.

Error: certificate has expired
    at TLSSocket.<anonymous> (_tls_wrap.js:1088:38)
    at emitNone (events.js:86:13)
    at TLSSocket.emit (events.js:188:7)
    at TLSSocket._finishInit (_tls_wrap.js:610:8)
    at TLSWrap.ssl.onhandshakedone (_tls_wrap.js:440:38)

what we want do is,
  1. we have to install nvm
  2. we have to install npm and node version using nvm.
  3. we have to install ionic for relevant node version.

follow the following steps. 

  • $ nvm ( check whether nvm install or not )
  • node -v  ( check whether any node version install or not )
nvm install
  • $ curl -sL https://raw.githubusercontent.com/creationix/nvm/v0.35.3/install.sh -o install_nvm.sh
  • $ nano install_nvm.sh
  • $ bash install_nvm.sh
  • $ source ~/.profile
  • $ nvm ls-remote
list down installed node version on nvm
  • $ nvm ls
install node 7 and 10 using NVM
  • $ nvm install 7.10.1
  • $ nvm install 10.17.0

  • $ nvm ls
    • ->   v7.10.1
    •        v10.17.0
    • default -> v7.10.1
    • node -> stable (-> v10.17.0) (default)
    • stable -> 10.17 (-> v10.17.0) (default)
    • iojs -> N/A (default)
    • unstable -> N/A (default)
    • lts/* -> lts/erbium (-> N/A)
    • lts/argon -> v4.9.1 (-> N/A)
    • lts/boron -> v6.17.1 (-> N/A)
    • lts/carbon -> v8.17.0 (-> N/A)
    • lts/dubnium -> v10.20.1 (-> N/A)
    • lts/erbium -> v12.17.0 (-> N/A)
ionic 3 install on node 7
  • $ nvm use 7.10.1
  • $ npm install -g ionic@3.8.1
  • create ionic project and cd <project name>
  • $ npm install
After ionic 3 install on node 10
  • $ nvm use 10.17.0
  • $ npm install -g ionic@3.8.1
  • If your in same project ignore following steps
    • create ionic project and cd <project name>
    • $ npm install
Build and Run
  • $ ionic serve
  • If You getting following error
    • Error: Missing binding /home/sahan/.../node_modules/node-sass/vendor/linux-x64-64/binding.node
    • Node Sass could not find a binding for your current environment: Linux 64-bit with Node.js 10.x

    • Found bindings for the following environments:
    •   - Linux 64-bit with Node.js 7.x

    • This usually happens because your environment has changed since running `npm install`.
    • Run `npm rebuild node-sass` to download the binding for your current environment.
  • $ npm rebuild node-sass
All Done



Other commends.
  • $ npm build
  • $ npm rebuild node-sass
  • $ npm rebuild --force

  • $ npm uninstall --save-dev gulp-sass
  • $ npm install --save-dev gulp-sass

Comments

Popular posts from this blog

Ionic3 Project Types

Getting Started With Ionic 5