aws-cdk-github-actions icon indicating copy to clipboard operation
aws-cdk-github-actions copied to clipboard

ERROR: unable to select packages: nodejs-npm (no such package)

Open avnersch opened this issue 3 years ago • 7 comments

Using: youyo/aws-cdk-github-actions@v2, and running on ubuntu-latest. As of yesterday, seeing this error when trying to perform cdk diff:

Build container for action use: '/home/runner/work/_actions/youyo/aws-cdk-github-actions/v2/./Dockerfile'.
  /usr/bin/docker build -t 8a33c1:f0a8b88d49a64f829c95f50c4cbe9d19 -f "/home/runner/work/_actions/youyo/aws-cdk-github-actions/v2/./Dockerfile" "/home/runner/work/_actions/youyo/aws-cdk-github-actions/v2"
  Sending build context to Docker daemon  15.36kB
  
  Step 1/4 : FROM alpine:3
  3: Pulling from library/alpine
  5843afab3874: Pulling fs layer
  5843afab3874: Verifying Checksum
  5843afab3874: Download complete
  5843afab3874: Pull complete
  Digest: sha256:234cb88d3020898631af0ccbbcca9a66ae7306ecd30c9720690858c1b007d2a0
  Status: Downloaded newer image for alpine:3
   ---> d4ff818577bc
  Step 2/4 : RUN apk --update --no-cache add nodejs nodejs-npm python3 py3-pip jq curl bash git docker && 	ln -sf /usr/bin/python3 /usr/bin/python
   ---> Running in 564aa081a22c
  fetch https://dl-cdn.alpinelinux.org/alpine/v3.14/main/x86_64/APKINDEX.tar.gz
  fetch https://dl-cdn.alpinelinux.org/alpine/v3.14/community/x86_64/APKINDEX.tar.gz
  ERROR: unable to select packages:
    nodejs-npm (no such package):
      required by: world[nodejs-npm]
  The command '/bin/sh -c apk --update --no-cache add nodejs nodejs-npm python3 py3-pip jq curl bash git docker && 	ln -sf /usr/bin/python3 /usr/bin/python' returned a non-zero code: 1

avnersch avatar Jun 16 '21 05:06 avnersch

I'm not 100% sure on what's going on, but I think this is linked to it.

Yesterday alpine v3.14 got released. https://alpinelinux.org/posts/Alpine-3.14.0-released.html

And I guess this might be the cause that nodejs-npm can't be found any more Found this in the changelog: https://gitlab.alpinelinux.org/alpine/aports/-/commit/25b10bd1a93e12a7e49fee38b0a229281ae49fb7

A possible quick fix might be to just use an older version of the alpine image: e.g. FROM alpine:3.13

FDR123 avatar Jun 16 '21 11:06 FDR123

Replacing "nodejs-npm" with "npm" also looks like a solution.

jeham avatar Jun 16 '21 12:06 jeham

Replacing "nodejs-npm" with "npm" also looks like a solution.

You are right. I just tried it locally and it is able to build without any issues. And I guess this solution is cleaner than downgrading

FDR123 avatar Jun 16 '21 12:06 FDR123

Glad the fix is in! That was fast ⚡ Any guess on when that PR will be merged in?

julissamackey avatar Jun 16 '21 14:06 julissamackey

My deployments are not working because of this. Any way to work around it while the PR is merged?

Zerquix18 avatar Jun 16 '21 19:06 Zerquix18

@Zerquix18 you can fork the project and change what @jeham suggested (start using your fork image (Zerquix18/aws-cdk-github-actions@master as an example) instead of this one). I did that while waiting the new change here because it was a blocker for the business.

leantorres73 avatar Jun 16 '21 20:06 leantorres73

The fix appears to work 👍

g-farrow avatar Jun 17 '21 13:06 g-farrow