After attempting to upgrade my version of Node.js on my Windows 10 machine (directly from the Node.js LTS Windows MSI download) I was left with an install of Node.js where I couldn’t use NPM.
Anytime I tried to use NPM (Node Package Manager) I would get the following error
npm WARN npm does not support Node.js v14.17.5
npm WARN You should probably upgrade to a newer version of node as we
npm WARN can't make any promises that npm will work with this version.
npm WARN Supported releases of Node.js are the latest release of 6, 8, 9, 10, 11, 12.
npm WARN You can find the latest version at https://nodejs.org/
npm ERR! cb.apply is not a function
When I check the current versions of node and npm I can see node.js is at version 14.17.5 but npm is only at 6.9.0

My first attempt was updating over the top of my existing node.js installation. I then tried uninstalling node.js installation (Windows Add/Remove Programs) and reinstalled. I ended up with the same error with npm.
What did fix the installation for me was to follow these steps
- Uninstall node.js (Windows Add/Remove programs)
- Manually delete the npm folder from your user profile (%APPDATA%/roaming/npm)
- Install node.js (from Windows 10 LTS download MSI)
This time around I could see the node.js installation was able to install an updated version of npm as well where it failed to upgrade an older npm if that folder already existed in my roaming profile.

This worked for me too, my npm v was not updated when I installed new node v, deleting node & manually deleting the npm folder & re installing node worked !
LikeLiked by 2 people
thnks !!
LikeLiked by 1 person
works for me too
LikeLiked by 1 person
Thank bro
LikeLiked by 1 person
Thanks for sharing this vital info. It worked for me.
LikeLiked by 1 person
Perfecto! Thank you for that 🙂
LikeLiked by 1 person
Amazing, got this problem for a few now and you just saved my day thanks 🙂
LikeLiked by 1 person
You are welcome 😊
LikeLike