I have eslint installed and I wanted to update it to a newer version. Upon trying to do this, I found out that I can't get rid of my current version of eslint.
I tried uninstalling via npm but it doesn't seem to remove the command.
$ eslint -v
v3.0.1
$ npm uninstall -g eslint
<a huge list of eslint node_modules>
$ eslint -v
v3.0.1
I tried checking where the command was from and where my global packages were saved but I am not sure what to do with this information.
$ which eslint
/usr/local/bin/eslint
That file was an alias to /usr/local/lib/node_modules/eslint/bin/eslint.js
$ npm list -g
/Users/inspiredtolive/.nvm/versions/node/v7.10.0/lib
<list of packages>
All I really want to do is install eslint with the version greater or equal to 4.9.0. What should I do?
You probably installed global npm package in an older node version. If this is the case reinstall all global packages to latest version directory by running
nvm reinstall-packages
then
npm remove eslint
Maybe you have installed eslint
globally via yarn
. Try yarn global remove eslint
.
BTW global yarn modules are saved here: disk:\Users\Username\AppData\Local\Yarn\Data\global\node_modules
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With