Blog coding and discussion of coding about JavaScript, PHP, CGI, general web building etc.

Sunday, May 8, 2016

Ionic installation after Ionic2 installation

Ionic installation after Ionic2 installation


I tried to install Ionic2 with no success, so I decided to go back to Ionic but during the process something went bad and I can't re-installl the ionic and cordova.

after sudo npm install -g cordova ionic, I tried to run ionic and got:

xx@xxx:~/dev$ ionic info  module.js:328      throw err;      ^    Error: Cannot find module 'xmlbuilder'      at Function.Module._resolveFilename (module.js:326:15)      at Function.Module._load (module.js:277:25)      at Module.require (module.js:354:17)      at require (internal/module.js:12:17)      at Object. (/usr/local/lib/node_modules/ionic/node_modules/xml2js/lib/xml2js.js:12:13)      at Object. (/usr/local/lib/node_modules/ionic/node_modules/xml2js/lib/xml2js.js:436:4)      at Module._compile (module.js:410:26)      at Object.Module._extensions..js (module.js:417:10)      at Module.load (module.js:344:32)      at Function.Module._load (module.js:301:12)  

my versions are:

xx@xxx:~/dev$ npm -v  2.14.12  gal@xxx:~/dev$ nodejs -v  v0.10.25  xx@xxx:~/dev$ node -v  v4.2.6  

Answer by Raphael for Ionic installation after Ionic2 installation


Have you tried to

sudo npm uninstall -g ionic  sudo npm install -g ionic  

Answer by Aish123 for Ionic installation after Ionic2 installation


I faced similar issues while downloading ionic 2. Try to install node version 4.2.3 and cordova version 5.4.1 first and then install ionic

  • For ionic v2, npm install -g ionic@beta
  • For ionic v1, npm install -g ionic

Answer by Ahmed Baracat for Ionic installation after Ionic2 installation


What worked for me was to use

sudo npm install -g ionic@beta  cordova  

to install the V2 version according to link.

Answer by xrexonx for Ionic installation after Ionic2 installation


I also encountered that issue. What I did was:

$ cd /usr/local/lib/node_modules/ionic/  $ npm install xmlbuilder  

You may also use sudo

It just happens that xmlbuilder is a dependency of xml2js and cannot load the module because it wasn't included in the ionic's package.json of the upon installing ionic.

Answer by Ku Zun for Ionic installation after Ionic2 installation


You should check your version of nodejs. Make sure that it's version 4. If not, uninstall nodejs and install ver 4. Goodluck! P/s: Uninstall:

sudo apt-get remove nodejs  

Install:

curl -sL https://deb.nodesource.com/setup_4.x | sudo -E bash -  sudo apt-get install -y nodejs  

Answer by Mike Bessonov for Ionic installation after Ionic2 installation


Cleaning the npm cache helped in my case. The actions required were:

  1. Install a stable version of nodejs depending of your OS follow these instructions.

  2. Remove all installed versions of cordova and ionic:

    sudo npm uninstall -g ionic cordova bower  
  3. Critically, clean the npm cache:

    npm cache clean  
  4. Install from scratch:

    sudo npm install bower cordova ionic -g  

NOTE: Do not install nodejs version from Ubuntu 14.04 LTS repository because is outdated.


Fatal error: Call to a member function getElementsByTagName() on a non-object in D:\XAMPP INSTALLASTION\xampp\htdocs\endunpratama9i\www-stackoverflow-info-proses.php on line 72

0 comments:

Post a Comment

Popular Posts

Powered by Blogger.