Home > Back-end >  How can I uninstall npm v18?
How can I uninstall npm v18?

Time:12-30

Accidently I installed npm v18, because I had some errors from package json scripts. Now I cannot run any npm command anymore. Every npm command responds with:

$ npm uninstall 18
node: /lib64/libm.so.6: version `GLIBC_2.27' not found (required by node)
node: /lib64/libc.so.6: version `GLIBC_2.25' not found (required by node)
node: /lib64/libc.so.6: version `GLIBC_2.28' not found (required by node)
node: /lib64/libstdc  .so.6: version `CXXABI_1.3.9' not found (required by node)
node: /lib64/libstdc  .so.6: version `GLIBCXX_3.4.20' not found (required by node)
node: /lib64/libstdc  .so.6: version `GLIBCXX_3.4.21' not found (required by node)

How Can I uninstall npm and go back earlier version?

CodePudding user response:

First, check which version of npm you currently have installed by running the following command:

npm -v

If the version displayed is not the version you want, you can try running the following command to uninstall npm:

sudo npm uninstall -g npm

After npm has been uninstalled, you can install the desired version of npm by running the following command, replacing X.X.X with the version number you want to install:

sudo npm install -g [email protected]

Once the desired version of npm has been installed, you can verify that it has been installed correctly by running the npm -v command again. I hope this helps!

CodePudding user response:

Solved it finally by hard installing following this link:https://www.digitalocean.com/community/tutorials/how-to-install-node-js-on-a-centos-7-server

  • Related