Ionic CLI not uninstalling - ionic2

This is related to my previous question here which was never resolved. I am trying to fix the problem by doing a fresh reinstall of Ionic.
I first tried uninstalling Ionic with sudo npm uninstall -g ionic, and it completes with no errors, but doing ionic -v still outputs 2.1.1, so obviously it didn't really get uninstalled. After that I tried sudo npm install -g ionic#latest, and my problem still persists.
What is even weirder is what happened when I tried to create a new project from scratch to test it. I did ionic start test --v2 on my Ubuntu machine, and doing ionic serve still does the same thing that I stated in my previous question.

npm uninstall -g ionic
npm uninstall -g #ionic/cli
finally i was able to uninstall with this...

I had the same issue for resolving this
Run npm uninstall -g ionic
Go to the location "/usr/local/bin/"
Delete Ionic File
Close terminal
Open new terminal and run "npm uninstall -g ionic"
Now run "ionic -v"

This probably happens due to multiple installations of ionic in your machine, more so this happens on windows.
Run:
"where ionic" in your command prompt
if it does not work try :
"which ionic" !! (probably linux)
This will give you the location of your installed ionic, in windows its mostly ..Local\AppData\Roaming.. somewhere.
Go to that location delete ionic and ionic.cmd file there.
Run: ionic -v now, make sure it gives you an error.
Be Happy if you see error.
run: npm install ionic#latest -g now
Run: ionic -v, make sure you see your latest ionic version there.
Be more happy now.

Uninstall cordova and ionic.
npm uninstall -g cordova
npm uninstall -g ionic
Then check to make sure you have the right version:
ionic -v

Use this command please
npm uninstall -g #ionic/cli

What is your node and npm versions ?
Please update latest node js (https://nodejs.org/en/download/current/)
then check that
node -v
npm -v
Node version must be v8.5.0 (includes npm 5.3.0) and then
sudo npm uninstall -g ionic
sudo npm cache clean --force
sudo npm install ionic
check the ionic version
ionic -v
version will be ^3.10.1. If everything is ok you can use new project command as given below
ionic start --list
you can see what kind of project types here as an example
ionic start blank

You can try running the command as below, it worked for me:
sudo npm uninstall -g #ionic/cli

If you are checking the ionic version inside project folder then
try to remove the ionic cli without -g option. It may be possible that you have installed local version of ionic inside project.

If you're using nvm, remember to delete ionic from where ionic. I deleted it via nvm uninstall {{version}}.

Related

pm2: command not found after npm -g

I have installed pm2 with the following command
npm install pm2#latest -g
This worked OK, and I am now running production services used pm2.
I exited the shell ( AWS ) and now if I try pm2 list I get error:-
pm2: command not found
I think the issue might be that I SHOULD have run sudo npm install pm2#latest -g
From previous stackoverflow answers I can see this is the suggested approach, but my question is this.....
If I now run sudo npm install pm2#latest -g will this impact my currently running pm2 services ?
Thanks
I belive the problem is that you haven't add the npm global directory to your sell path
Check this guide:
https://github.com/sindresorhus/guides/blob/master/npm-global-without-sudo.md
TLDR:
What you want to do is to get your npm prefix dir by executing
npm config get prefix
then your pm2 is in <YOUR_NPM_PREFIX>/bin/pm2
To add your npm global user dir to your shell PATH, you can put this commad
export PATH="$PATH:<YOUR_NPM_PREFIX>/bin"
in your .bashrc, don't forget to re-login your shell or source ~/.bashrc if you're using bash

I am getting errors while installing ember add on ember-cli-tutorial-style,

enter image description here
below versions of node, npm and ember-cli i am using...
ember-cli: 2.18.0
node: 8.9.4
os: win32 ia32
npm : 5.6.0
please guide me how to address this kind of issues
In error, warning its saying to update minimatch version to 3.0.2 for that you can run the below command,
npm install --save-dev minimatch#3.0.2
After that you can try running ember install ember-cli-tutorial-style.
If this still shows error, you can directly do,
npm install --save-dev ember-cli-tutorial-style
Actually this does not have to do with minimatch warning.
What npm is telling you, is that it cannot find that module (in your case ember-cli-tutorial-style).
Make sure that, this npm package actually exists!

Unable to install ionic2 on Mac OS by installing node and npm also

unable to install ionic 2
Successfully Installed ionic2#beta using
sudo npm install -g ionic#beta
ionic -v shows version 1.7.14
Uninstalled using npm uninstall -g ionic
Successfully (based on printout) uninstalled ionic 2
ionic -v shows version 1.7.14 (WTF)
Tried npm uninstall -g ionic again
Received command prompt immediately, no other outputs (no affect)
ionic -v shows version 1.7.14
You have 2 choices.
As comment suggests do:
sudo npm install -g ionic#beta
You will have to do this for every global command as you dont have permission to the folders.
Or
Check npm fix permission issue
You can change the global node module directory of npm so that you wont need permission. You can also use app like homebrew to set up your node.

Ember Cli on windows

I m trying to get Ember cli on Windows 7.I have installed node and npm.
But when I type npm install -g ember-cli I get the following error.Is there anything that I am missing?
Try running:
npm package.json
to see errors in the package.json file. Otherwise try:
npm cache clean

Loopback lb-ng (LoopBack Angular SDK command-line tool) not working

I'm going through the tutorials of http://docs.strongloop.com, and I've reached http://docs.strongloop.com/display/public/LB/Add+a+client+app.
Yet when I execute 'lb-ng ../server/server.js js/lb-services.js' I get an error: Cannot find module 'loopback'.
Any help would be appreciated!
For the new version of loopback you need to install lb-ng command with this line of command
sudo npm install -g loopback-sdk-angular-cli
also try to be in the client folder make sure that you have js directory in client directory then execute these lb-ng commad
lb-ng ../server/server.js js/lb-services.js
it will work
:)
did you npm install your dependencies? check and see if you have a node_modules dir in your project root.
if you're using a newer version of node, try uninstalling node and reinstalling an LTS version.
npm uninstall -g strongloop
npm cache clear
npm install -g strongloop
This is how I fixed this problem for me.
install strong loop and then run lb-ng command this is how i fixed this problem

Categories