npm ERR! cb.apply is not a function

Solution 1:

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.

Solution 2:

Mac/Macbook users

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).