npm / npm-registry-client

http://npm.im/npm-registry-client
ISC License
264 stars 108 forks source link

[BUG] unexpected error when publishing fails #179

Open jaroslav-kubicek opened 4 years ago

jaroslav-kubicek commented 4 years ago

Hi 👋

I've found a bug when trying to publish to npm with invalid token:

/Users/jaroslavkubicek/projects/incubator/node_modules/npm-registry-client/lib/publish.js:124
      client.log.error('publish', 'Failed PUT ' + (res && res.statusCode))
                 ^

TypeError: client.log.error is not a function

=> npm-registry-client fails on client.log.error not being a function instead logging what actually happened