"sudo npm install -g ionic" shows nothing - node.js

I'm trying to install ionic in my ubuntu laptop.
I have successfully installed Node.js and Cordova. They are working properly.
But when I try to install Ionic from sudo npm install -g ionic it doesn't give any output.
Then I wrote ionic in cmd, it says No command 'ionic' found,
Any idea about this is really appreciated.
cmd outputs

Your npm is not correctly installed. Try to uninstall it and install again.

Related

Can't Upgrade Ionic Version on Ubuntu

I'm trying to update my Ionic Cli from 6.12.2 to the latest version (6.19.0). I'm using Ubuntu. I was able to update node.js to the latest version, but when I run the commands:
npm uninstall -g ionic
npm uninstall -g #ionic/cli
with or without sudo command, when I run ionic -v again, it still say that I have the version 6.12.2 of ionic. and when I run npm install -g #ionic/cli and then run ionic -v it still say the same. Those commands are not being able to remove ionic from my Ubuntu.
That is something like a cache folder on ubunt that I should delete from system, related with the ionic cli, or something like that? Because I was not able to do this following the documentation on website.
To work around the problem, you can install the latest version from tarball:
cd /tmp
wget https://registry.npmjs.org/#ionic/cli/-/cli-6.19.0.tgz
sudo npm -g install cli-6.19.0.tgz

I am unable to uninstall Angular-Cli on Ubuntu Server

I am unable to uninstall Angular in server on Ubuntu.
i tried the below commands
npm uninstall -g angular-cli
npm uninstall -g #angular/cli
when i uninstall the angular , i am getting the error. find the screenshots for your reference.
when i run the node, npm and ng commands in the server,it is showing version but ng command not working. I have installed ng using this command sudo apt install ng-common successfully but it is showing same erro like ng is currently not installed. find the screenshot for your reference.
how can i uninstall angular in server?
It looks like it's installed, the only thing you'll need to do is make sure that the ng bin is in your PATH.

Error installing Cordova using NodeJs on Windows 7

Error installing Cordova using NodeJs on Windows 7
Please advice
Try to Run the command line as Administrator.
Your installation command is wrong!
It is
npm install -g cordova
not
npm -g install cordova
You must run cmd as administrator. If problem persist then install node and npm again.
or clean npm cache by npm cache clean command
NOTE : you must have an active internet connection!

Ionic Installation via npm

I am facing an error while installing cordova and ionic each and everytime. As I start my installation using npm install -g cordova ionic. The installation cursor keeps on rotating like for many minutes and then I have to explicitly terminate the installation. Please help me with this issue.
you can try
npm --loglevel info install -g cordova ionic
and it should tell you more about what is happening / where the installation process stalls.
try npm install -g cordova first followed by npm install -g ionic
also you may need to install other missing components if any, CLI will intimate you very nicely.
What the command:
npm install -g cordova
ionic does is tries to install the cordova and ionic in a sequential order and -g manages the environment variables as well.
So, i recommend you to first install cordova then ionic.
npm install -g cordova,
npm install -g ionic,
Furthermore, i prefer using gitbash CLI rather than the cli provided by default.
It handles the issues of bower installation which may appear afterwards.And if you want a complete guide from installing to building an android project you can try the steps of the blog from here.
Good Luck.
Using cache help me to face this issue with following command :
npm install -g cordova ionic --cache "c:\path\to\use\as\dependencies\cache"

phonegap - nothing happend on npm install -g phonegap

I've been trying to install phonegap with no luck.
I've already installed nodejs using:
sudo apt-get install node
But when I tried to run the following, nothing was outputted to the terminal. See attached image.
sudo npm install -g phonegap
Package name should be "nodejs" not "node".
Also make sure npm is installed by typing :
npm -v
in terminal.
Please read Installing Node.js via package manager for Node.js & NPM installation.

Resources