ddev: `nodejs_version: 14` fails to build on `ddev start` and `/bin/sh: 1: npm: not found`

Is there an existing issue for this?

  • I have searched the existing issues

Expected Behavior

Trying to install node 14

In .ddev/config.yml setting:

nodejs_version: "14"

fails to build. With:

nodejs_version: "16"

it builds fine.

https://ddev.readthedocs.io/en/latest/users/configuration/config/#nodejs_version suggests 14 should be OK, no?

Actual Behavior



#19 [drud/ddev-webserver:v1.21.5-gcd-drupal-built 7/8] RUN bash /tmp/setup_node.sh >/dev/null && apt-get install -y nodejs >/dev/null
#19 3.480 E: Failed to fetch https://deb.nodesource.com/node_16.x/dists/bullseye/main/binary-amd64/Packages.gz  File has unexpected size (775 != 776). Mirror sync in progress? [IP: 86.189.96.72 443]
#19 3.480    Hashes of expected file:
#19 3.480     - Filesize:776 [weak]
#19 3.480     - SHA256:e5d3c880cdb1ec15f193329e5a3abe68056c59f6026144de4d4b52fcce2131e6
#19 3.480     - SHA1:87f1583949354fe006bc0137a84d8cfe90b0229d [weak]
#19 3.480     - MD5Sum:c881892f3a46cc943e7ff44162cbee62 [weak]
#19 3.480    Release file created at: Wed, 19 Apr 2023 16:10:35 +0000
#19 3.480 E: Some index files failed to download. They have been ignored, or old ones used instead.
#19 ERROR: executor failed running [/bin/sh -c bash /tmp/setup_node.sh >/dev/null && apt-get install -y nodejs >/dev/null]: exit code: 1
------
 > [drud/ddev-webserver:v1.21.5-gcd-drupal-built 7/8] RUN bash /tmp/setup_node.sh >/dev/null && apt-get install -y nodejs >/dev/null:
#19 3.480 E: Failed to fetch https://deb.nodesource.com/node_16.x/dists/bullseye/main/binary-amd64/Packages.gz  File has unexpected size (775 != 776). Mirror sync in progress? [IP: 86.189.96.72 443]
#19 3.480    Hashes of expected file:
#19 3.480     - Filesize:776 [weak]
#19 3.480     - SHA256:e5d3c880cdb1ec15f193329e5a3abe68056c59f6026144de4d4b52fcce2131e6
#19 3.480     - SHA1:87f1583949354fe006bc0137a84d8cfe90b0229d [weak]
#19 3.480     - MD5Sum:c881892f3a46cc943e7ff44162cbee62 [weak]
#19 3.480    Release file created at: Wed, 19 Apr 2023 16:10:35 +0000
#19 3.480 E: Some index files failed to download. They have been ignored, or old ones used instead.
------
', stderr='failed to solve: executor failed running [/bin/sh -c bash /tmp/setup_node.sh >/dev/null && apt-get install -y nodejs >/dev/null]: exit code: 1' 

Is this because 14 is no longer in LTS? https://nodejs.dev/en/about/releases/

About this issue

  • Original URL
  • State: closed
  • Created a year ago
  • Comments: 20 (19 by maintainers)

Most upvoted comments

I’ll give that a shot. Thanks, @rfay. Sorry that this turned into a conversation that took us down a slightly different road from the original issue. Hopefully, other folks find it helpful, though.