I am getting this error
npm ERR! cb.apply is not a function
in Linux while doing npm install although my npm version is 6.9.0. My node version is v12.18.3. How to resolve this issue?
Would be helpful if you shared if it's Windows or Linux, but the error seems to occur on Windows. Possible solution:
1. Go to C:\Users(your username)\AppData\Roaming
2. Delete the npm folder (possibly back it up) and if there is one npm cache folder.
3. Run `npm cache clear --force` (--force is now required to clean cache)
After that, npm install should work fine.
Since this question is fairly active and a top google result for this issue (I know the OP is using Linux) and we have every other OS covered in this list. Here is how to fix it on a Mac.
On a Mac you do not have the AppData\Roaming folder, so simply run npm root -g and then navigate to the hidden directory and delete the node_modules there. If using nvm you'll need to rerun nvm use x.x.x (where x.x.x is your version).
solution for Windows:
in my case i didn't want to delete all the npm directory inside "C:/users/me/AppData/Roaming/" because i had there many global modules that is already exist and installed.
what worked inspired by @user14360499 above:
npm install my project, and keep working as usually