Issues running npm install from Azure DevOps


(Larry Steele) #1

I’m using version 1 of the NPM build tasks in Azure DevOps. I’m issuing the npm install command to load the package.json file. I keep getting the following error:
npm ERR! cb() never called!

npm ERR! This is an error with npm itself. Please report this error at:
npm ERR! https://npm.community

Seems to be quite generic and I’m not certain what package could be causing an issue. If I run the commands manually on the build server I only see warnings:
D:\apps\nodejs>npm install F:\a1_work\544\s
npm WARN bootstrap@4.3.1 requires a peer of jquery@1.9.1 - 3 but none is installed. You must install peer dependencies yourself.
npm WARN bootstrap@4.3.1 requires a peer of popper.js@^1.14.7 but none is installed. You must install peer dependencies yourself.

  • pcp.ui@0.0.0
    added 137 packages from 218 contributors in 23.765s

(John Gee) #2

I don’t know Azure DevOps but can offer some npm oriented advice.

The cb() never called is a symptom rather than the underlying problem, and there should be another error with more clues. Check the log file that is mentioned in the error message, if the log persists and you can get to it, or add --verbose to the install to get (LOTS) of logging direct to the console.


(Larry Steele) #3

[command]C:\Windows\system32\cmd.exe /D /S /C “D:\Apps\nodejs\npm.cmd install”
npm info it worked if it ends with ok
npm verb cli [ ‘D:\apps\nodejs\node.exe’,
npm verb cli ‘D:\apps\nodejs\node_modules\npm\bin\npm-cli.js’,
npm verb cli ‘prefix’,
npm verb cli ‘-g’ ]
npm info using npm@6.8.0
npm info using node@v10.15.2
npm verb exit [ 0, true ]
npm timing npm Completed in 49ms
npm info ok
npm info it worked if it ends with ok
npm verb cli [ ‘D:\apps\nodejs\node.exe’,
npm verb cli ‘D:\apps\nodejs\node_modules\npm\bin\npm-cli.js’,
npm verb cli ‘install’ ]
npm info using npm@6.8.0
npm info using node@v10.15.2
npm verb npm-session 226045228f230ddd
npm info lifecycle pcp.ui@0.0.0~preinstall: pcp.ui@0.0.0
npm timing stage:loadCurrentTree Completed in 13ms
npm timing stage:loadIdealTree:cloneCurrentTree Completed in 1ms
npm timing stage:loadIdealTree:loadShrinkwrap Completed in 590ms
npm timing stage:loadIdealTree:loadAllDepsIntoIdealTree Completed in 871ms
npm timing stage:loadIdealTree Completed in 1768ms
npm timing stage:generateActionsToTake Completed in 363ms
npm verb correctMkdir C:\Users\svctfsbuildprod\AppData\Roaming\npm-cache_locks correctMkdir not in flight; initializing
npm verb lock using C:\Users\svctfsbuildprod\AppData\Roaming\npm-cache_locks\staging-661307c94b2d0039.lock for F:\a1_work\544\s\node_modules.staging
npm timing audit submit Completed in 1120ms
npm http fetch POST 200 https://registry.npmjs.org/-/npm/v1/security/audits/quick 1121ms
npm timing audit body Completed in 5ms
npm timing npm Completed in 18744ms
npm ERR! cb() never called!

npm ERR! This is an error with npm itself. Please report this error at:
npm ERR! https://npm.community


(John Gee) #4

Thanks for log. I am out of questions and no answers, as I didn’t spot anything to chase in the log.


(Larry Steele) #5

I resolved this by downgrading node to 8.11.1 and npm 5.6.0. Go figure…hehe


(system) closed #6

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.