Error in log during npm install

Hi,

I have a octopus deploy running that is having some odd behavior in the logs.

The NPM steps of the process are being logged as “error” even though they are passing and nothing is actually failing.

10:56:27 Info | > libxmljs@0.18.7 install C:\Octopus\Applications\DEV\Database\1.0.95\node_modules\libxmljs
10:56:27 Info | > node-pre-gyp install --fallback-to-build --loglevel http
10:56:27 Error | node-pre-gyp http GET https://github.com/libxmljs/libxmljs/releases/download/v0.18.7/node-v48-win32-x64.tar.gz
10:56:27 Error | node-pre-gyp http 200 https://github.com/libxmljs/libxmljs/releases/download/v0.18.7/node-v48-win32-x64.tar.gz
10:56:32 Info | [libxmljs] Success: “C:\Octopus\Applications\DEV\Database\1.0.95\node_modules\libxmljs\build\Release\xmljs.node” is installed via remote

This script runs without any perceivable errors locally and the application is setup correctly and runs fine after the build is deployed.

Ideas?

Hi Jon,

Sorry to hear you’re having problems. It looks like npm reports errors even when it succeeds with the install. Can you try redirecting the output of the npm install command by adding 2>&1 to the end of the command and see if that helps.

Thanks
Cameron MacFarland

While that would work and getting rid of the error flagging, how can I tell what is actually causing it to error itself? I don’t see anywhere in the logs where it is producing anything that looks like an error.

Hi Jon,

NPM reports some information on the sterr console, instead of the stout console. It looks like the downloading of the precompiled libxmljs library from https://github.com/libxmljs/libxmljs/releases is reported as an error even when it isn’t.

Because these messages are reported on stderr Octopus Deploy sees them and thinks the process has failed. However the exit code of the process is 0, which is what Octopus Deploy cares about most. So you’re seeing fail messages in the log, but the process is still deploying successfully.

Thanks
Cameron MacFarland

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