Wikimedia Developer Support

Npm install raises "cb() never called!"

I tried to write an script (using travis CI) where the deployment can be automated for WikiContrib tool. I need to generate a build file to host my frontend. But whenever I run the command npm install to install the required dependencies. I get the following error.

cb() never called!

I tried searching it and found few suggestions like updating npm or clearning the cache. But I could not solve it (as I can not update npm version). Is there any way to solve this out?


You might try running your build commands inside a Kubernetes pod. Toolforge has a “node10” container for its Kubernetes cluster which uses node v10.15.2 and npm v6.5.0 which are both newer than then node v8.11.1 and npm v5.8.0 that are installed on the Toolforge bastions and grid engine nodes.

$ ssh
$ become <your tool name>
$ webservice --backend=kubernetes node10 shell
Defaulting container name to interactive.
Use 'kubectl describe pod/interactive -n bd808-test' to see all of the containers in this pod.
If you don't see a command prompt, try pressing enter.
$ cd <wherever you need to be to run your build>
$ npm install

Thanks for the reply @bd808. I am already using lighttpd as the webservice, on using kubernetes shell, don’t it affect the current webservice ?

The ‘shell’ action of the webservice command does not start or alter a running webservice Kubernetes pod (or a grid job either). We probably should have made a separate cli wrapper to make this more clear, but at the time (3+ years ago) it seemed to make sense to keep all of the Kubernetes wrapper scripts together as part of the ‘webservice’ command.