I've started using GitHub Actions to test projects as well as running builds. Heroku is part of this playground. While working, I stumbled across an issue that took some time to fix. Sharing here my notes for others to benefit. When you come across
npm ERR cb() never called, you might want to try these steps to fix the issue:
npm ERR! cb() never called!
npm ERR! This is an error with npm itself. Please report this error at:
npm ERR! <https://github.com/npm/npm/issues>
As mentioned, in my case it was on GitHub:
From researching the issue, I've learned this also appears to happen a lot on other npm packages like React Native and Meteor but also on services such as Heroku. I've discovered various solutions to fix the issue I'd like to share:
Clearing the NPM Cache & Upgrading NPM #
If this issue comes up on your local development machine, it might pay to clear the cache:
npm cache clean -force
Secondly, ensure you are running the latest version of npm:
npm install npm@latest -g
node_modulesbefore running an install too.
Fixing your NPM version #
It's been noted, that hard defining the required node version helped. For this, you will need to append this to your
Doesn't fix it? #
If this doesn't fix it you could raise the question with details on Stackoverflow. Feel free to mention this site with the things you have already tried.
Since you've made it this far, sharing this article on your favorite social media network would be highly appreciated 💖! For feedback, please ping me on Twitter.