You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Debian Stretch-based images (including the default major version tags) ship with an older Python 3, which is incompatible with the latest node-gyp@8
#1550
Closed
DeeDeeG opened this issue
Aug 21, 2021
· 1 comment
Image Tag: Any, but especially the node:16 Debian Stretch-based tag if NPM adopts node-gyp@8, see issue linked above.
Expected Behavior
Python 3 on the official NodeJS Docker images should be new enough to run node-gyp@8 (should be Python 3.6 or newer, see nodejs/node-gyp#2333.)
For reference, node-gyp is the most widely-used native (C/C++) code build tool in the NodeJS ecosystem, used to build native code addons for JS Node modules, which are also popularly known as npm packages. node-gyp@8 is the latest major version of node-gyp as of when I'm posting this issue.
Current Behavior
The Debian Stretch-based, default image tags (node:12, node:14, node:16) ship the same Python 3.5.3 that comes with Debian Stretch itself.
That is too old for node-gyp@8; node-gyp@8 rebuild fails due to requiring newer Python than that.
Possible Solution
Add a step to the image definition that adds Python 3.6.x or newer. This should be available as the first python3 on the PATH.
It's possible to do so while still shipping a copy of python3.5 for those who might need it, I suppose.
Steps to Reproduce
$ sudo docker run --rm -it node:14 bashroot@f27b1d9f6da7:/# mkdir fails_to_build &&cd fails_to_buildroot@f27b1d9f6da7:/fails_to_build# npm install superstring --jobs=MAX### [builds successfully using npm 6.x's bundled copy of node-gyp@5]root@f27b1d9f6da7:/fails_to_build# npx node-gyp@latest rebuild --jobs=MAX### [node-gyp@8 build failure message here due to outdated Python 3.5.3]
Additional Information
The NPM team have been carefully weighing whether to adopt node-gyp@8 in npm@7 and how/when to do so. If they do, that will likely be picked up in the Node 16.x series and newer in due time.
If NPM and Node decide to do that soon, it could leave users of the node:16 tag with broken node-gyp@8 --> broken package installs, due to incompatible/outdated Python 3.5.3 shipping in the image.
As mentioned in the above-linked issue, users of the latest pnpm are already affected on the Stretch-based images, as the latest pnpm has already made the jump to bundling node-gyp@8.
The text was updated successfully, but these errors were encountered:
DeeDeeG
changed the title
Debian Stretch-based images ship with an older Python 3, which is incompatible with the latest node-gyp@8
Debian Stretch-based images (including the default major version tags) ship with an older Python 3, which is incompatible with the latest node-gyp@8
Aug 21, 2021
Duplicate of #1528
We don't ship anything on the images to support building native packages. In the case of Alpine, there isn't any version of Python included
Environment
node:16
Debian Stretch-based tag if NPM adopts node-gyp@8, see issue linked above.Expected Behavior
Python 3 on the official NodeJS Docker images should be new enough to run node-gyp@8 (should be Python 3.6 or newer, see nodejs/node-gyp#2333.)
For reference,
node-gyp
is the most widely-used native (C/C++) code build tool in the NodeJS ecosystem, used to build native code addons for JS Node modules, which are also popularly known as npm packages. node-gyp@8 is the latest major version of node-gyp as of when I'm posting this issue.Current Behavior
The Debian Stretch-based, default image tags (
node:12
,node:14
,node:16
) ship the same Python 3.5.3 that comes with Debian Stretch itself.That is too old for node-gyp@8;
node-gyp@8 rebuild
fails due to requiring newer Python than that.Possible Solution
Add a step to the image definition that adds Python 3.6.x or newer. This should be available as the first
python3
on the PATH.It's possible to do so while still shipping a copy of
python3.5
for those who might need it, I suppose.Steps to Reproduce
Additional Information
The NPM team have been carefully weighing whether to adopt node-gyp@8 in npm@7 and how/when to do so. If they do, that will likely be picked up in the Node 16.x series and newer in due time.
See discussion here: nodejs/node-gyp#2392
If NPM and Node decide to do that soon, it could leave users of the
node:16
tag with brokennode-gyp@8
--> broken package installs, due to incompatible/outdated Python 3.5.3 shipping in the image.As mentioned in the above-linked issue, users of the latest
pnpm
are already affected on the Stretch-based images, as the latestpnpm
has already made the jump to bundlingnode-gyp@8
.The text was updated successfully, but these errors were encountered: