Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Package source for nodejs is incorrect #17

Closed
vweevers opened this issue Jul 30, 2021 · 0 comments · Fixed by #18
Closed

Package source for nodejs is incorrect #17

vweevers opened this issue Jul 30, 2021 · 0 comments · Fixed by #18
Labels
bug Something isn't working

Comments

@vweevers
Copy link
Member

vweevers commented Jul 30, 2021

In the linux-armv6, linux-armv7, linux-arm64, android-armv7 and android-arm64 images, we're installing the nodejs package from the wrong source (debian rather than nodesource).

As can be seen in the docker build output of linux-armv6 for example:

...
Setting up nodejs (12.21.0~dfsg-5) ...

Confirmed by running:

> apt-cache policy nodejs
nodejs:
  Installed: (none)
  Candidate: 12.21.0~dfsg-5
  Version table:
     12.21.0~dfsg-5 500
        500 http://deb.debian.org/debian bullseye/main amd64 Packages
     10.24.1-1nodesource1 500
        500 https://deb.nodesource.com/node_10.x buster/main amd64 Packages

Because of this, npm isn't installed because only the nodesource package contains npm. This breaks prebuildify-cross which relies on npx.

Can be solved by doing:

echo Package: nodejs >> /etc/apt/preferences.d/preferences
echo Pin: origin deb.nodesource.com >> /etc/apt/preferences.d/preferences
echo Pin-Priority: 1000 >> /etc/apt/preferences.d/preferences

In addition, as you may notice in the output above, we're targeting the wrong debian version (in at least linux-armv6). Should be bullseye instead of buster.

@vweevers vweevers added the bug Something isn't working label Jul 30, 2021
vweevers added a commit that referenced this issue Jul 30, 2021
In our dockcross-based images, the 'nodejs' package is available in
both default debian sources and nodesource. Debian's package does
not include npm.

Not sure what changed or when, but it's fixed by increasing the
priority of nodesource. This in turn revealed that we were
targeting the wrong debian version; should be bullseye instead of
buster.

Closes #17.
vweevers added a commit that referenced this issue Jul 30, 2021
In our dockcross-based images, the 'nodejs' package is available in
both default debian sources and nodesource. Debian's package does
not include npm.

Not sure what changed or when, but it's fixed by increasing the
priority of nodesource. This in turn revealed that we were
targeting the wrong debian version; should be bullseye instead of
buster.

Closes #17.
vweevers added a commit to prebuild/prebuildify-cross that referenced this issue Jul 31, 2021
Depends on prebuild/docker-images#19. Effectively fixes a critical
bug (prebuild/docker-images#17) for dockcross-based images. Those
are:

- `linux-armv6`
- `linux-armv7`
- `linux-arm64`
- `android-armv7`
- `android-arm64`

Also pins image versions (to version 1) by default, which is now
possible because the images are tagged with version numbers in
addition to the `latest` tag.

Image descriptions have moved to the prebuild/docker-images
repository.
vweevers added a commit to prebuild/prebuildify-cross that referenced this issue Aug 1, 2021
Depends on prebuild/docker-images#19. Effectively fixes a critical
bug (prebuild/docker-images#17) for dockcross-based images. Those
are:

- `linux-armv6`
- `linux-armv7`
- `linux-arm64`
- `android-armv7`
- `android-arm64`

Also pins image versions (to version 1) by default, which is now
possible because the images are tagged with version numbers in
addition to the `latest` tag.

Image descriptions have moved to the prebuild/docker-images
repository.

Uses a temporary fork of the docker-pull npm package in order to
include mafintosh/docker-pull#2.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant