I can't uninstall vue from ubuntu - vue.js

Hello i'm working on WSL and to run my vue project i need vue 2.9.0
and vue -V shows vue 2.9.6
I'v tried comand npm uninstall #vue/cli and npm uninstall -g #vue/cli
but vue -V still shows vue 2.9.6
Please help

Did you try to clear the cache?
The following should work:
npm uninstall -g #vue/cli
npm clear cache --force
If you are using the older version of vue cli (1.x or 2.x) like you are, then you can uninstall it like this.
npm uninstall -g vue-cli

Related

create-react-app not working not after upgrading npm and nodejs

I upgraded npm and nodejs to 6.14.4 and 12.16.3 resp. Getting below error while creating react app using create-react-app.
According to readme:
If you've previously installed create-react-app globally via npm
install -g create-react-app, we recommend you uninstall the package
using npm uninstall -g create-react-app to ensure that npx always uses
the latest version.
So resolved the problem using command:
npx create-react-app contactmanager

How can I update vue cli version?

I want to create a project on Vue Project Manager. When I try, I see that error message;
"vue create is a Vue CLI 3 only command and you are using Vue CLI 2.9.6."
This is my vue --version output: #vue/cli 4.0.5.
How can I fix this?
My system configuration is as follow:
Ubuntu 18.04
Npm 6.13.0
Node 10.16.3
Uninstall it first with
npm uninstall vue-cli -g or yarn global remove vue-cli
Then install it again with
npm install -g #vue/cli
# OR
yarn global add #vue/cli
The package name changed from vue-cli to #vue/cli that is why you need to uninstall it first and install it again.
First remove the existing package from globally Make sure you have administrator priviledge
npm uninstall vue-cli -g
Then -
I believe this will work and install latest version
npm install -g #vue/cli
Reference - https://cli.vuejs.org/guide/installation.html
Once you done Verify
vue --version
It worked on my work approach, uninstall the vue and reinstall using the steps in the documentation. enter link description here
1 - remove vue: sudo npm uninstall -g vue-cli
2 - install using: sudo npm install -g #vue/clisudo npm uninstall -g vue-cli
I found that in my case, I have had #vue/cli installed using npm install -g and also yarn add global.
for that reason even when I did yarn global remove #vue/cli, I still would get result from vue --version resulted in: -old-version-number-.
I had to to also uninstall it with:
npm uninstall vue-cli -g
It seems you have more than one versions of vue.
Delete the #vue folder from this directory
C:\Users\Muhammad Abbas\AppData\Roaming\npm\node_modules
After that run this command
npm install -g #vue/cli
This will solve the Problem
You could install 'vue' somewhere by yarn, which put this 'vue' in your path ahead of /usr/local/bin. so do this first:
which vue
if this output is not the one you just reinstalled, just remove it. After this, run which vue again to check, and vue -V to confirm it has been upgrade to what you've installed.
This would work with version 3 of Vue CLI
npm update -g #vue/cli
The recommended way to start a Vite-powered Vue project.
Visit GitHub
https://github.com/vuejs/create-vue
I made it myself with this method:
1=> npm uninstall -g vue-cli
2=> npm i -g #vue/cli
3=> vue create myproject
4=> cd myproject
5=> npm run serve

How to fix the error when installing vue-cli

when I run the command npm install -g vue-cli I get the following warning, apparently I have no errors
but when executing
vue init webpack my-project
or
vue --version
this pops up
As the docs say vue-cli is the old package name
Warning regarding Previous Versions
The package name changed from vue-cli to #vue/cli. If you have the previous vue-cli (1.x or 2.x) package installed globally, you need to uninstall it first with npm uninstall vue-cli -g or yarn global remove vue-cli.
cf: https://cli.vuejs.org/guide/installation.html
As manu said try using npm install -g #vue/cli
use command : sudo npm install -g #vue/cli
as the error is because of permission
The error seems to be cause by permission, you could run powershell with admin then run the command npm i -g #vue/cli

How to uninstall Gulp CLI from NPM globally?

I have the following package installed globally via npm:
+-- gulp-cli#2.0.1 (github:gulpjs/gulp-cli#4782b9a582ce7cc7e009073705a565b57d235332)
I have tried to uninstall it like so...
npm uninstall gulp-cli#2.0.1
But it does not remove it. How can I get this package removed from my global location?
I'm on npm version 6.1.0
Thanks to R. Wanjohi I figured it out for my machine. I had to do the following to get the global version of gulp cli off my machine:
npm rm -g gulp-cli
I was experiencing the same problem but when I used the following code, it worked:
npm rm -g gulp
You need to uninstall it globally (add the -g tag)
npm uninstall -g gulp-cli#2.0.1
Here is the npm docs: https://docs.npmjs.com/cli/uninstall.html
it's pretty simple, to uninstall a global package run
npm uninstall -g <package-name>
to verify run
npm ls -g --depth=0
for short videos

Uninstalling Expo CLI

I have installed Expo CLI globally and cant start a new react native app without using expo cli and therefore would like to uninstall it from my system. I have spent hours trying to work out how to removeit globally from my system
To completely uninstall expo cli
On Windows
The first step npm -g uninstall expo-cli --save (also yarn global remove expo-cli if you use yarn).
Second cd %USERPROFILE% && rmdir /Q /S .expo
On Mac OS Catalina
The first step npm -g uninstall expo-cli --save (also yarn global remove expo-cli if you use yarn).
Second cd ~ && rm -rf .expo
Thanks to #Александр Наумкин and #Liko for editing and comments
npm -g uninstall expo-cli --save did not work for me, but yarn global remove expo-cli did.
I expected the npm option to work, and was surprised when it didn't. I am using nvm, and wonder if this answer explains why the npm option didn't work for me.
I had the same problem and after searching I found this command:
npm -g uninstall expo-cli --save
finally expo-cli is deleted from my pc but it still asks about it every time I type create-react-native-app. if anybody knows how to go on from here be my guest.
and I hope this helps you
edit: if you use react-native init it is almost the same as create-react-native-app without expo-cli. This is how I chose to carry on as using the create command with expo-cli gives the application error after error if you install any api.
if you are using npm then this command will work for uninstalling expo cli
npm -g uninstall expo-cli --save
I had the same problem once, i have tried
npm -g uninstall expo-cli
but after the my problem didn't get solved, i have searched lot even after that problem did't get solved,
i am also using yarn so finally i have decided to remove using the yarn
i tried
yarn global remove expo-cli
This indeed solved my issue
If you are using nvm.
search for node version with expo installed.
find ~/.nvm -name "*expo*" -type d
nvm use {nodeversion}
npm -g uninstall expo-cli
If yarn don't work for you or you prefer using npm use:
npm rm -g expo cli
Very simple to uninstall a npm package.
Just enter this command :
npm uninstall -g expo-cli
In Windows 10 npm uninstall -g expo-cli --save worked for me from nodejs console, opening it as administrator
In windows 10 to uninstall :
npm uninstall -g expo-cli --save
yarn remove global expo-cli
Worked for me.
After that, for install last version then:
npm install -g expo-cli --save
expo-cli --version
3.21.13
I had this issue.
My steps
npm cache clean --force
npx install create-react-native-app
cd
npm install -g expo-cli
expo start
If you get error at 4 about node.js just install latest version. Then
Open your package.json file and add:
"react-navigation": "git://github.com/Snailapp/react-navigation.git#2.18.5"
npm install
Ok, in addition to existing answers, with commands like npm -g uninstall expo-cli and deleting manually .expo folder inside %USER% i try expo whoami, and my output was:
$ expo whoami
There is a new version of expo-cli available (4.13.0).
You are currently using expo-cli 3.23.3
Install expo-cli globally using the package manager of your choice;
for example: npm install -g expo-cli to get the latest version
[13:13:03] › Not logged in, run expo login to authenticate
So i had to do a bit more manual work:
%USER%\AppData\local and deleted expo folder
went to %USER%\AppData\Roaming\npm folder and manually deleted expo related files
After that i did expo whoami and output is:
$ expo whoami
bash: /c/Users/User/AppData/Roaming/npm/expo: No such file or directory
Finally, i opened new command prompt and did npm i --g expo-cli and after installation with expo -V i get 4.13.0.
I had the same issue
i unistalled using
npm uninstall expo-cli
or
npm unistall -g expo-cli