winston: Cannot install on docker after 3.3.0/3.3.1

npm ERR! path git
npm ERR! code ENOENT
npm ERR! errno ENOENT
npm ERR! syscall spawn git
npm ERR! enoent Error while executing:
npm ERR! enoent undefined ls-remote -h -t ssh://git@github.com/DABH/diagnostics.git
npm ERR! enoent
npm ERR! enoent
npm ERR! enoent spawn git ENOENT
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent

Looks like this is related with #1813, and it still happens when trying to install on docker with nodejs 12.

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Reactions: 8
  • Comments: 23 (6 by maintainers)

Commits related to this issue

Most upvoted comments

All, v3.3.2 has been released, this downloads the forked diagnostics dependency from NPM not GitHub so it should work for you. Please feel free to confirm or deny. Thanks!

@DABH @Kivol

hum, yep, I understand, Thx 😃

For me the solution remains temporary and the issue should not be closed.

An NPM package should not require git for installation but only npm. If you use a FORK from another package because this one does not correspond to your need. I think this FORK must be integrated at the source or become a project maintained for Winston and therefore published as you suggested. It would be quite strange to impose the installation of git or any other tools for the installation of an npm package, for hundreds docker image. Images and process must be as lite as possible

Hi, I just want to express that git shouldn’t be a dep for winstonjs. Hope this can be resolved. We have a few hundreds of docker images and I don’t think modifying all of them would be very ideal. And I am sure a lot of us would feel the same. 😃

If 3.3.x really does have such breaking change, we should move it to 4.x instead.

@DABH @Kivol

Thanks for the active comments, please have patience for a couple hours as we try to roll out a better (non-git-dependent) solution for this.

Yes I’ve come up with the same solution.(I couldn’t even imagine that git isn’t shipped on alpine…) I’m fine with that solution.

The problem was not with winston so I’m closing this. Thanks for the help!

+1 for this issue, this breaks our CI pipeline. Please revert the changes.

Just to say that I think the comments above shows clearly how much Winston is used and depending on by many projects. So whilst it’s a pain when issues occur - I hope I speak for many - when I say we do value the contribution Winston and it’s developers make.

Thanks for the fix.

Same problem here, please fix it. Unfortunately winston is installed as a module of a subdependency, so we can not directly modify the version. This breaks our CI pipeline that has no access to public github.

I have the same problem not in a docker image but in my enterprise network.

I use artifactory for download all dependencies (npm and github was blocked). If you use your fork, all projects without public access will fail. The biggest impact is for companies or CI/CD with restreint access.

For my point of view if you want keep your fork, you need to be standard and create a new package npm and not referer to a github repo.

Same problem here, but not only in docker. I can’t npm install my project because of this dependency :

npm ERR! Error while executing:
npm ERR! /usr/local/bin/git ls-remote -h -t ssh://git@github.com/DABH/diagnostics.git
npm ERR! 
npm ERR! ssh: connect to host github.com port 22: Connection timed out
npm ERR! fatal: Could not read from remote repository.
npm ERR! 
npm ERR! Please make sure you have the correct access rights
npm ERR! and the repository exists.
npm ERR! 
npm ERR! exited with error code: 128

Wow, this one breaks the internet… 😃 Very strange to require git indeed.

Second the comments above about this change being a breaking change. We have alpine docker images in production that will break due to this.

If this is required, then would support a 4.x change.

Ah, because the dep is coming from github, you need git…

FROM node:14-alpine

RUN apk update && apk upgrade && \
    apk add --no-cache bash git openssh

RUN npm install git+https://github.com/lodash/lodash

I understand that’s not a great solution. The alternative is I have to publish my diagnostics fork on NPM, but that package is already on NPM so I guess I’d need to change the name of my repo or something so I can publish uniquely. Any tips welcome else I’ll look at this later today.