Skip to content
This repository has been archived by the owner on Apr 30, 2023. It is now read-only.

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

Open
avnersch opened this issue Jun 16, 2021 · 7 comments
Open

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

avnersch opened this issue Jun 16, 2021 · 7 comments

Comments

@avnersch
Copy link

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
@FDR123
Copy link
Contributor

FDR123 commented Jun 16, 2021

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

@jeham
Copy link

jeham commented Jun 16, 2021

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

@FDR123
Copy link
Contributor

FDR123 commented Jun 16, 2021

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

@julissamackey
Copy link

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

@Zerquix18
Copy link

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

@leantorres73
Copy link

leantorres73 commented Jun 16, 2021

@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.

@g-farrow
Copy link
Contributor

The fix appears to work 👍

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants