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

npm 10.4.0 fails "npm install" when using node 18.19.1 and running under slow multi platform ARM build #7231

Closed
2 tasks done
tlbdk opened this issue Feb 19, 2024 · 8 comments
Labels
Bug thing that needs fixing Needs Triage needs review for next steps Release 10.x

Comments

@tlbdk
Copy link

tlbdk commented Feb 19, 2024

Is there an existing issue for this?

  • I have searched the existing issues

This issue exists in the latest npm version

  • I am using the latest npm

Current Behavior

We are building our node docker images from this repo:
https://github.com/connectedcars/docker-node

This has been working well until we upgraded to npm 10.4.0, npm 9.8.1 works without issue.

The build is a multi platform(linux/amd64 and linux/arm64) docker build on a linux/amd64 build machine. For the ARM build it consistently fails when using npm 10.4.0 with EPIPE error while fetching different npm packages. The arm64 build is about 10x slower than the amd64 build so this could indicate that we are hitting a race condition of some sort. We also tested on a Macbook Pro M3(linux/arm64) and here we don't see the issue.

#21 [builder 14/16] RUN --mount=type=ssh     --mount=type=secret,id=NPM_TOKEN,uid=1000     secrets2env npm install
#21 298.6 npm ERR! code EPIPE
#21 298.7 npm ERR! syscall write
#21 298.7 npm ERR! errno EPIPE
#21 298.9 npm ERR! request to https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz failed, reason: write EPIPE
#21 299.2 
#21 299.2 npm ERR! A complete log of this run can be found in: /home/builder/.npm/_logs/2024-02-19T12_48_51_863Z-debug-0.log
#21 ERROR: executor failed running [/bin/sh -c secrets2env npm install]: exit code: 1

Expected Behavior

Install packages without errors.

Steps To Reproduce

  1. Build linux/arm64 image on google cloud build amd64 machine (10x slower than normal)
  2. With this package.json https://github.com/connectedcars/docker-node/blob/master/test/package.json
  3. Run 'npm install'
  4. See error 'chore: use the extracted stringify-package module #21 298.6 npm ERR! code EPIPE'

Environment

  • npm:10.4.0
  • Node.js: 18.19.1
  • OS Name: Linux/Docker (Google Cloud Build)
  • System Model Name:
  • npm config:
# Disable npm color output and be less verbose
npm config set color false --global
# Read NPM token from environment variable
npm config set '//registry.npmjs.org/:_authToken' '${NPM_TOKEN}' --global
@tlbdk tlbdk added Bug thing that needs fixing Needs Triage needs review for next steps Release 10.x labels Feb 19, 2024
@tlbdk
Copy link
Author

tlbdk commented Feb 19, 2024

Found this issue that looks similar: nodejs/node#46188

@tlbdk
Copy link
Author

tlbdk commented Feb 19, 2024

A few more examples:

Step #3:  ---> [Warning] The requested image's platform (linux/arm64) does not match the detected host platform (linux/amd64) and no specific platform was requested
Step #3:  ---> Running in ab77cb9bac55
Step #3: npm ERR! code ECONNRESET
Step #3: npm ERR! errno ECONNRESET
Step #3: npm ERR! network request to https://registry.npmjs.org/is-map/-/is-map-2.0.2.tgz failed, reason: socket hang up
Step #3: npm ERR! network This is a problem related to network connectivity.
Step #3: npm ERR! network In most cases you are behind a proxy or have bad network settings.
Step #3: npm ERR! network 
Step #3: npm ERR! network If you are behind a proxy, please make sure that the
Step #3: npm ERR! network 'proxy' config is set properly.  See: 'npm help config'
Step #3: 
Step #3: npm ERR! A complete log of this run can be found in: /home/builder/.npm/_logs/2024-02-16T15_20_05_374Z-debug-0.log
Step #3: The command '/bin/sh -c npm install' returned a non-zero code: 1
Step #3: Step 19/26 : RUN npm install
Step #3:  ---> [Warning] The requested image's platform (linux/arm64) does not match the detected host platform (linux/amd64) and no specific platform was requested
Step #3:  ---> Running in e9dee9556f9e
Step #3: npm ERR! code EPIPE
Step #3: npm ERR! syscall write
Step #3: npm ERR! errno EPIPE
Step #3: npm ERR! request to https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz failed, reason: write EPIPE
Step #3: 
Step #3: npm ERR! A complete log of this run can be found in: /home/builder/.npm/_logs/2024-02-16T00_13_12_493Z-debug-0.log
Step #3: The command '/bin/sh -c npm install' returned a non-zero code: 1

@tlbdk
Copy link
Author

tlbdk commented Feb 20, 2024

With a bit more log info:

Step #1: #21 [builder 14/16] RUN --mount=type=ssh     --mount=type=secret,id=NPM_TOKEN,uid=1000     secrets2env npm install --loglevel verbose node-expat
Step #1: #21 17.80 npm verb cli /usr/local/bin/node /usr/local/bin/npm
Step #1: #21 17.83 npm info using npm@10.4.0
Step #1: #21 17.83 npm info using node@v18.19.1
Step #1: #21 17.86 npm verb title npm install node-expat
Step #1: #21 17.88 npm verb argv "install" "--loglevel" "verbose" "node-expat"
Step #1: #21 17.90 npm verb logfile logs-max:10 dir:/home/builder/.npm/_logs/2024-02-19T22_59_17_047Z-
Step #1: #21 18.61 npm verb logfile /home/builder/.npm/_logs/2024-02-19T22_59_17_047Z-debug-0.log
Step #1: #21 44.32 npm http fetch GET 200 https://registry.npmjs.org/node-expat 9197ms (cache miss)
Step #1: #21 46.04 npm http fetch GET 200 https://registry.npmjs.org/bindings 1151ms (cache miss)
Step #1: #21 46.18 npm http fetch GET 200 https://registry.npmjs.org/nan 1274ms (cache miss)
Step #1: #21 47.07 npm http fetch GET 200 https://registry.npmjs.org/file-uri-to-path 446ms (cache miss)
Step #1: #21 50.65 npm verb reify failed optional dependency /app/node_modules/fsevents
Step #1: #21 52.21 npm http fetch POST 200 https://registry.npmjs.org/-/npm/v1/security/advisories/bulk 3304ms
Step #1: #21 150.7 npm http fetch GET 200 https://registry.npmjs.org/get-func-name 98336ms (cache miss)
Step #1: #21 151.0 npm http fetch GET 200 https://registry.npmjs.org/file-uri-to-path/-/file-uri-to-path-1.0.0.tgz 98570ms (cache miss)
Step #1: #21 151.0 npm http fetch GET 200 https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz 96056ms attempt #2 (cache miss)
Step #1: #21 151.1 npm http fetch GET 200 https://registry.npmjs.org/bindings/-/bindings-1.5.0.tgz 98665ms attempt #2 (cache miss)
Step #1: #21 151.2 npm http fetch GET 200 https://registry.npmjs.org/lodash.get/-/lodash.get-4.4.2.tgz 96240ms attempt #2 (cache miss)
Step #1: #21 152.8 npm http fetch GET 200 https://registry.npmjs.org/loupe 1279ms (cache miss)
Step #1: #21 153.0 npm http fetch GET 200 https://registry.npmjs.org/chai 1588ms (cache miss)
Step #1: #21 153.5 npm http fetch GET 200 https://registry.npmjs.org/nan/-/nan-2.18.0.tgz 101017ms attempt #2 (cache miss)
Step #1: #21 215.0 npm http fetch GET 200 https://registry.npmjs.org/yargs-unparser/-/yargs-unparser-2.0.0.tgz 162455ms attempt #3 (cache miss)
Step #1: #21 223.6 npm http fetch GET 200 https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz 171106ms attempt #3 (cache miss)
Step #1: #21 223.6 npm http fetch GET 200 https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz 170951ms attempt #3 (cache miss)
Step #1: #21 237.6 npm http fetch GET 200 https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz 184963ms attempt #3 (cache miss)
Step #1: #21 238.7 npm http fetch GET 200 https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz 185929ms attempt #3 (cache miss)
Step #1: #21 239.0 npm http fetch GET 200 https://registry.npmjs.org/which-collection/-/which-collection-1.0.1.tgz 186097ms attempt #3 (cache miss)
Step #1: #21 239.2 npm http fetch GET 200 https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz 186275ms attempt #3 (cache miss)
Step #1: #21 239.6 npm http fetch GET 200 https://registry.npmjs.org/which-typed-array/-/which-typed-array-1.1.8.tgz 186781ms attempt #3 (cache miss)
Step #1: #21 239.8 npm http fetch GET 200 https://registry.npmjs.org/which-boxed-primitive/-/which-boxed-primitive-1.0.2.tgz 186935ms attempt #3 (cache miss)
Step #1: #21 239.8 npm http fetch GET 200 https://registry.npmjs.org/type-detect/-/type-detect-4.0.8.tgz 186780ms attempt #3 (cache miss)
Step #1: #21 240.2 npm http fetch GET 200 https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz 187037ms attempt #3 (cache miss)
Step #1: #21 240.2 npm http fetch GET 200 https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz 187092ms attempt #3 (cache miss)
Step #1: #21 240.4 npm http fetch GET 200 https://registry.npmjs.org/string.prototype.trimstart/-/string.prototype.trimstart-1.0.5.tgz 187119ms attempt #3 (cache miss)
Step #1: #21 240.4 npm http fetch GET 200 https://registry.npmjs.org/sqlstring/-/sqlstring-2.3.1.tgz 186871ms attempt #3 (cache miss)
Step #1: #21 240.5 npm http fetch GET 200 https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.5.tgz 187150ms attempt #3 (cache miss)
Step #1: #21 240.5 npm http fetch GET 200 https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz 187072ms attempt #3 (cache miss)
Step #1: #21 240.7 npm http fetch GET 200 https://registry.npmjs.org/regexp.prototype.flags/-/regexp.prototype.flags-1.4.3.tgz 186933ms attempt #3 (cache miss)
Step #1: #21 240.8 npm http fetch GET 200 https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz 187032ms attempt #3 (cache miss)
Step #1: #21 240.8 npm http fetch GET 200 https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz 186319ms attempt #3 (cache miss)
Step #1: #21 240.9 npm http fetch GET 200 https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz 186997ms attempt #3 (cache miss)
Step #1: #21 241.0 npm http fetch GET 200 https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz 180734ms attempt #3 (cache miss)
Step #1: #21 241.0 npm http fetch GET 200 https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz 187813ms attempt #3 (cache miss)
Step #1: #21 241.0 npm http fetch GET 200 https://registry.npmjs.org/is-weakset/-/is-weakset-2.0.2.tgz 185875ms attempt #3 (cache miss)
Step #1: #21 241.0 npm http fetch GET 200 https://registry.npmjs.org/just-extend/-/just-extend-4.2.1.tgz 186010ms attempt #3 (cache miss)
Step #1: #21 241.1 npm http fetch GET 200 https://registry.npmjs.org/once/-/once-1.4.0.tgz 186780ms attempt #3 (cache miss)
Step #1: #21 241.1 npm http fetch GET 200 https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz 182059ms attempt #3 (cache miss)
Step #1: #21 241.2 npm http fetch GET 200 https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz 187476ms attempt #3 (cache miss)
Step #1: #21 241.2 npm http fetch GET 200 https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz 188047ms attempt #3 (cache miss)
Step #1: #21 241.2 npm http fetch GET 200 https://registry.npmjs.org/is-weakref/-/is-weakref-1.0.2.tgz 186031ms attempt #3 (cache miss)
Step #1: #21 241.2 npm http fetch GET 200 https://registry.npmjs.org/isarray/-/isarray-2.0.5.tgz 186117ms attempt #3 (cache miss)
Step #1: #21 241.2 npm http fetch GET 200 https://registry.npmjs.org/check-error/-/check-error-1.0.2.tgz 182641ms attempt #3 (cache miss)
Step #1: #21 241.3 npm http fetch GET 200 https://registry.npmjs.org/browser-stdout/-/browser-stdout-1.3.1.tgz 182461ms attempt #3 (cache miss)
Step #1: #21 241.3 npm http fetch GET 200 https://registry.npmjs.org/@connectedcars/private-module/-/private-module-0.0.3.tgz 181586ms attempt #3 (cache miss)
Step #1: #21 241.3 npm http fetch GET 200 https://registry.npmjs.org/@ungap/promise-all-settled/-/promise-all-settled-1.1.2.tgz 182011ms attempt #3 (cache miss)
Step #1: #21 241.4 npm http fetch GET 200 https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz 187962ms attempt #3 (cache miss)
Step #1: #21 241.4 npm http fetch GET 200 https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz 187475ms attempt #3 (cache miss)
Step #1: #21 241.4 npm http fetch GET 200 https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz 187319ms attempt #3 (cache miss)
Step #1: #21 241.4 npm http fetch GET 200 https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz 187283ms attempt #3 (cache miss)
Step #1: #21 241.4 npm http fetch GET 200 https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz 182180ms attempt #3 (cache miss)
Step #1: #21 241.4 npm http fetch GET 200 https://registry.npmjs.org/anymatch/-/anymatch-3.1.2.tgz 182286ms attempt #3 (cache miss)
Step #1: #21 241.6 npm http fetch GET 200 https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz 187332ms attempt #3 (cache miss)
Step #1: #21 241.6 npm http fetch GET 200 https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz 187301ms attempt #3 (cache miss)
Step #1: #21 241.6 npm http fetch GET 200 https://registry.npmjs.org/camelcase/-/camelcase-6.3.0.tgz 182843ms attempt #3 (cache miss)
Step #1: #21 241.6 npm http fetch GET 200 https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz 181049ms attempt #3 (cache miss)
Step #1: #21 241.6 npm http fetch GET 200 https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz 181519ms attempt #3 (cache miss)
Step #1: #21 241.6 npm http fetch GET 200 https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz 181271ms attempt #3 (cache miss)
Step #1: #21 241.6 npm http fetch GET 200 https://registry.npmjs.org/ms/-/ms-2.1.2.tgz 181158ms attempt #3 (cache miss)
Step #1: #21 241.7 npm http fetch GET 200 https://registry.npmjs.org/unbox-primitive/-/unbox-primitive-1.0.2.tgz 188672ms attempt #3 (cache miss)
Step #1: #21 241.7 npm http fetch GET 200 https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz 187269ms attempt #3 (cache miss)
Step #1: #21 241.7 npm http fetch GET 200 https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-6.0.0.tgz 188069ms attempt #3 (cache miss)
Step #1: #21 241.7 npm http fetch GET 200 https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz 182506ms attempt #3 (cache miss)
Step #1: #21 241.7 npm http fetch GET 200 https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz 182800ms attempt #3 (cache miss)
Step #1: #21 241.7 npm http fetch GET 200 https://registry.npmjs.org/assertion-error/-/assertion-error-1.1.0.tgz 182647ms attempt #3 (cache miss)
Step #1: #21 241.7 npm http fetch GET 200 https://registry.npmjs.org/ms/-/ms-2.1.3.tgz 187058ms attempt #3 (cache miss)
Step #1: #21 241.8 npm http fetch GET 200 https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz 181345ms attempt #3 (cache miss)
Step #1: #21 241.8 npm http fetch GET 200 https://registry.npmjs.org/pathval/-/pathval-1.1.1.tgz 187790ms attempt #3 (cache miss)
Step #1: #21 241.8 npm http fetch GET 200 https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz 182930ms attempt #3 (cache miss)
Step #1: #21 241.8 npm http fetch GET 200 https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz 181855ms attempt #3 (cache miss)
Step #1: #21 241.9 npm http fetch GET 200 https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz 181966ms attempt #3 (cache miss)
Step #1: #21 241.9 npm http fetch GET 200 https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz 181690ms attempt #3 (cache miss)
Step #1: #21 241.9 npm http fetch GET 200 https://registry.npmjs.org/side-channel/-/side-channel-1.0.4.tgz 188335ms attempt #3 (cache miss)
Step #1: #21 241.9 npm http fetch GET 200 https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-1.8.0.tgz 187877ms attempt #3 (cache miss)
Step #1: #21 242.0 npm http fetch GET 200 https://registry.npmjs.org/@types/sinonjs__fake-timers/-/sinonjs__fake-timers-8.1.2.tgz 182595ms attempt #3 (cache miss)
Step #1: #21 242.1 npm http fetch GET 200 https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.1.tgz 182806ms attempt #3 (cache miss)
Step #1: #21 242.1 npm http fetch GET 200 https://registry.npmjs.org/@types/mysql/-/mysql-2.15.21.tgz 182632ms attempt #3 (cache miss)
Step #1: #21 242.1 npm http fetch GET 200 https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz 181824ms attempt #3 (cache miss)
Step #1: #21 242.1 npm http fetch GET 200 https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.4.tgz 189561ms attempt #3 (cache miss)
Step #1: #21 242.2 npm http fetch GET 200 https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz 188507ms attempt #3 (cache miss)
Step #1: #21 242.3 npm http fetch GET 200 https://registry.npmjs.org/minimatch/-/minimatch-5.0.1.tgz 187470ms attempt #3 (cache miss)
Step #1: #21 242.4 npm http fetch GET 200 https://registry.npmjs.org/available-typed-arrays/-/available-typed-arrays-1.0.5.tgz 183409ms attempt #3 (cache miss)
Step #1: #21 242.5 npm http fetch GET 200 https://registry.npmjs.org/call-bind/-/call-bind-1.0.2.tgz 183718ms attempt #3 (cache miss)
Step #1: #21 242.5 npm http fetch GET 200 https://registry.npmjs.org/nanoid/-/nanoid-3.3.3.tgz 187895ms attempt #3 (cache miss)
Step #1: #21 242.5 npm http fetch GET 200 https://registry.npmjs.org/@types/sinon/-/sinon-10.0.13.tgz 183126ms attempt #3 (cache miss)
Step #1: #21 242.6 npm http fetch GET 200 https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz 183942ms attempt #3 (cache miss)
Step #1: #21 242.7 npm http fetch GET 200 https://registry.npmjs.org/object-is/-/object-is-1.1.5.tgz 188245ms attempt #3 (cache miss)
Step #1: #21 242.7 npm http fetch GET 200 https://registry.npmjs.org/@sinonjs/fake-timers/-/fake-timers-6.0.1.tgz 183133ms attempt #3 (cache miss)
Step #1: #21 242.8 npm http fetch GET 200 https://registry.npmjs.org/braces/-/braces-3.0.2.tgz 183977ms attempt #3 (cache miss)
Step #1: #21 243.2 npm http fetch GET 200 https://registry.npmjs.org/object-inspect/-/object-inspect-1.12.2.tgz 188713ms attempt #3 (cache miss)
Step #1: #21 243.4 npm http fetch GET 200 https://registry.npmjs.org/chokidar/-/chokidar-3.5.3.tgz 184800ms attempt #3 (cache miss)
Step #1: #21 243.4 npm http fetch GET 200 https://registry.npmjs.org/workerpool/-/workerpool-6.2.1.tgz 190559ms attempt #3 (cache miss)
Step #1: #21 243.4 npm http fetch GET 200 https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz 189442ms attempt #3 (cache miss)
Step #1: #21 243.9 npm http fetch GET 200 https://registry.npmjs.org/loupe/-/loupe-2.3.4.tgz 189061ms attempt #3 (cache miss)
Step #1: #21 244.2 npm http fetch GET 200 https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz 185090ms attempt #3 (cache miss)
Step #1: #21 244.6 npm http fetch GET 200 https://registry.npmjs.org/@sinonjs/commons/-/commons-1.8.3.tgz 184931ms attempt #3 (cache miss)
Step #1: #21 244.6 npm http fetch GET 200 https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz 190764ms attempt #3 (cache miss)
Step #1: #21 245.1 npm http fetch GET 200 https://registry.npmjs.org/bignumber.js/-/bignumber.js-9.0.0.tgz 186098ms attempt #3 (cache miss)
Step #1: #21 245.1 npm http fetch GET 200 https://registry.npmjs.org/yargs/-/yargs-16.2.0.tgz 192504ms attempt #3 (cache miss)
Step #1: #21 245.4 npm http fetch GET 200 https://registry.npmjs.org/@sinonjs/text-encoding/-/text-encoding-0.7.2.tgz 185849ms attempt #3 (cache miss)
Step #1: #21 245.4 npm http fetch GET 200 https://registry.npmjs.org/@sinonjs/samsam/-/samsam-5.3.1.tgz 185839ms attempt #3 (cache miss)
Step #1: #21 245.8 npm http fetch GET 200 https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz 190693ms attempt #3 (cache miss)
Step #1: #21 246.0 npm http fetch GET 200 https://registry.npmjs.org/diff/-/diff-4.0.2.tgz 185990ms attempt #3 (cache miss)
Step #1: #21 246.5 npm http fetch GET 200 https://registry.npmjs.org/nise/-/nise-4.1.0.tgz 191907ms attempt #3 (cache miss)
Step #1: #21 246.7 npm http fetch GET 200 https://registry.npmjs.org/mysql/-/mysql-2.18.1.tgz 192053ms attempt #3 (cache miss)
Step #1: #21 246.9 npm http fetch GET 200 https://registry.npmjs.org/chai/-/chai-4.3.6.tgz 188169ms attempt #3 (cache miss)
Step #1: #21 248.0 npm http fetch GET 200 https://registry.npmjs.org/@types/node/-/node-18.7.16.tgz 188523ms attempt #3 (cache miss)
Step #1: #21 248.5 npm http fetch GET 200 https://registry.npmjs.org/mocha/-/mocha-10.0.0.tgz 193702ms attempt #3 (cache miss)
Step #1: #21 249.5 npm http fetch GET 200 https://registry.npmjs.org/sinon/-/sinon-9.2.4.tgz 195988ms attempt #3 (cache miss)
Step #1: #21 249.8 npm http fetch GET 200 https://registry.npmjs.org/node-expat/-/node-expat-2.4.0.tgz 197344ms attempt #3 (cache miss)
Step #1: #21 250.1 npm http fetch GET 200 https://registry.npmjs.org/@connectedcars/test/-/test-0.22.0.tgz 190368ms attempt #3 (cache miss)
Step #1: #21 252.9 npm verb type system
Step #1: #21 252.9 npm verb stack FetchError: request to https://registry.npmjs.org/object.assign/-/object.assign-4.1.4.tgz failed, reason: socket hang up
Step #1: #21 252.9 npm verb stack     at ClientRequest.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/minipass-fetch/lib/index.js:130:14)
Step #1: #21 252.9 npm verb stack     at ClientRequest.emit (node:events:517:28)
Step #1: #21 252.9 npm verb stack     at TLSSocket.socketOnEnd (node:_http_client:525:9)
Step #1: #21 252.9 npm verb stack     at TLSSocket.emit (node:events:529:35)
Step #1: #21 252.9 npm verb stack     at endReadableNT (node:internal/streams/readable:1400:12)
Step #1: #21 252.9 npm verb stack     at process.processTicksAndRejections (node:internal/process/task_queues:82:21)
Step #1: #21 252.9 npm verb cwd /app
Step #1: #21 252.9 npm verb Linux 5.10.0-27-cloud-amd64
Step #1: #21 252.9 npm verb node v18.19.1
Step #1: #21 252.9 npm verb npm  v10.4.0
Step #1: #21 252.9 npm ERR! code ECONNRESET
Step #1: #21 252.9 npm ERR! errno ECONNRESET
Step #1: #21 253.1 npm ERR! network request to https://registry.npmjs.org/object.assign/-/object.assign-4.1.4.tgz failed, reason: socket hang up
Step #1: #21 253.1 npm ERR! network This is a problem related to network connectivity.
Step #1: #21 253.1 npm ERR! network In most cases you are behind a proxy or have bad network settings.
Step #1: #21 253.1 npm ERR! network 
Step #1: #21 253.1 npm ERR! network If you are behind a proxy, please make sure that the
Step #1: #21 253.1 npm ERR! network 'proxy' config is set properly.  See: 'npm help config'
Step #1: #21 253.1 npm verb exit 1
Step #1: #21 253.1 npm verb unfinished npm timer reify 1708383569359
Step #1: #21 253.1 npm verb unfinished npm timer reify:unpack 1708383590995
Step #1: #21 253.1 npm verb unfinished npm timer reifyNode:node_modules/object.assign 1708383591167
Step #1: #21 253.1 npm verb unfinished npm timer reifyNode:node_modules/log-symbols 1708383591186
Step #1: #21 253.1 npm verb unfinished npm timer reifyNode:node_modules/is-weakmap 1708383591197
Step #1: #21 253.1 npm verb unfinished npm timer reifyNode:node_modules/is-unicode-supported 1708383591198
Step #1: #21 253.1 npm verb unfinished npm timer reifyNode:node_modules/is-typed-array 1708383591199
Step #1: #21 253.1 npm verb unfinished npm timer reifyNode:node_modules/is-symbol 1708383591201
Step #1: #21 253.1 npm verb unfinished npm timer reifyNode:node_modules/is-string 1708383591202
Step #1: #21 253.1 npm verb unfinished npm timer reifyNode:node_modules/is-shared-array-buffer 1708383591204
Step #1: #21 253.1 npm verb unfinished npm timer reifyNode:node_modules/is-set 1708383591205
Step #1: #21 253.1 npm verb unfinished npm timer reifyNode:node_modules/is-regex 1708383591206
Step #1: #21 253.1 npm verb unfinished npm timer reifyNode:node_modules/is-plain-obj 1708383591208
Step #1: #21 253.1 npm verb unfinished npm timer reifyNode:node_modules/is-number-object 1708383591209
Step #1: #21 253.1 npm verb unfinished npm timer reifyNode:node_modules/is-number 1708383591210
Step #1: #21 253.1 npm verb unfinished npm timer reifyNode:node_modules/is-negative-zero 1708383591212
Step #1: #21 253.1 npm verb unfinished npm timer reifyNode:node_modules/is-map 1708383591213
Step #1: #21 253.1 npm verb unfinished npm timer reifyNode:node_modules/is-glob 1708383591215
Step #1: #21 253.1 npm verb unfinished npm timer reifyNode:node_modules/is-fullwidth-code-point 1708383591216
Step #1: #21 253.1 npm verb unfinished npm timer reifyNode:node_modules/is-extglob 1708383591217
Step #1: #21 253.1 npm verb unfinished npm timer reifyNode:node_modules/is-date-object 1708383591219
Step #1: #21 253.1 npm verb unfinished npm timer reifyNode:node_modules/is-callable 1708383591220
Step #1: #21 253.1 npm verb unfinished npm timer reifyNode:node_modules/is-boolean-object 1708383591221
Step #1: #21 253.1 npm verb unfinished npm timer reifyNode:node_modules/is-binary-path 1708383591223
Step #1: #21 253.1 npm verb unfinished npm timer reifyNode:node_modules/is-bigint 1708383591224
Step #1: #21 253.1 npm verb unfinished npm timer reifyNode:node_modules/is-arguments 1708383591225
Step #1: #21 253.1 npm verb unfinished npm timer reifyNode:node_modules/internal-slot 1708383591227
Step #1: #21 253.1 npm verb unfinished npm timer reifyNode:node_modules/inherits 1708383591228
Step #1: #21 253.1 npm verb unfinished npm timer reifyNode:node_modules/inflight 1708383591230
Step #1: #21 253.1 npm verb unfinished npm timer reifyNode:node_modules/he 1708383591231
Step #1: #21 253.1 npm verb unfinished npm timer reifyNode:node_modules/has-tostringtag 1708383591233
Step #1: #21 253.1 npm verb unfinished npm timer reifyNode:node_modules/has-symbols 1708383591235
Step #1: #21 253.1 npm verb unfinished npm timer reifyNode:node_modules/has-property-descriptors 1708383591280
Step #1: #21 253.1 npm verb unfinished npm timer reifyNode:node_modules/has-flag 1708383591282
Step #1: #21 253.2 npm verb unfinished npm timer reifyNode:node_modules/has-bigints 1708383591283
Step #1: #21 253.2 npm verb unfinished npm timer reifyNode:node_modules/has 1708383591285
Step #1: #21 253.2 npm verb unfinished npm timer reifyNode:node_modules/glob-parent 1708383591286
Step #1: #21 253.2 npm verb unfinished npm timer reifyNode:node_modules/glob 1708383591287
Step #1: #21 253.2 npm verb unfinished npm timer reifyNode:node_modules/get-symbol-description 1708383591292
Step #1: #21 253.2 npm verb unfinished npm timer reifyNode:node_modules/get-intrinsic 1708383591294
Step #1: #21 253.2 npm verb unfinished npm timer reifyNode:node_modules/get-func-name 1708383591295
Step #1: #21 253.2 npm verb unfinished npm timer reifyNode:node_modules/get-caller-file 1708383591296
Step #1: #21 253.2 npm verb unfinished npm timer reifyNode:node_modules/functions-have-names 1708383591298
Step #1: #21 253.2 npm verb unfinished npm timer reifyNode:node_modules/function.prototype.name 1708383591299
Step #1: #21 253.2 npm verb unfinished npm timer reifyNode:node_modules/function-bind 1708383591300
Step #1: #21 253.2 npm verb unfinished npm timer reifyNode:node_modules/fs.realpath 1708383591303
Step #1: #21 253.2 npm verb unfinished npm timer reifyNode:node_modules/for-each 1708383591305
Step #1: #21 253.2 npm verb unfinished npm timer reifyNode:node_modules/flat 1708383591306
Step #1: #21 253.2 npm verb unfinished npm timer reifyNode:node_modules/find-up 1708383591307
Step #1: #21 253.2 npm verb unfinished npm timer reifyNode:node_modules/fill-range 1708383591309
Step #1: #21 253.2 npm verb unfinished npm timer reifyNode:node_modules/escape-string-regexp 1708383591310
Step #1: #21 253.2 npm verb unfinished npm timer reifyNode:node_modules/escalade 1708383591311
Step #1: #21 253.2 npm verb unfinished npm timer reifyNode:node_modules/es-to-primitive 1708383591313
Step #1: #21 253.2 npm verb unfinished npm timer reifyNode:node_modules/es-get-iterator 1708383591314
Step #1: #21 253.2 npm verb unfinished npm timer reifyNode:node_modules/es-abstract 1708383591316
Step #1: #21 253.2 npm verb unfinished npm timer reifyNode:node_modules/emoji-regex 1708383591317
Step #1: #21 253.2 npm verb unfinished npm timer reifyNode:node_modules/diff 1708383591319
Step #1: #21 253.2 npm verb unfinished npm timer reifyNode:node_modules/define-properties 1708383591320
Step #1: #21 253.2 npm verb unfinished npm timer reifyNode:node_modules/deep-equal 1708383591322
Step #1: #21 253.2 npm verb unfinished npm timer reifyNode:node_modules/deep-eql 1708383591323
Step #1: #21 253.2 npm verb unfinished npm timer reifyNode:node_modules/decamelize 1708383591325
Step #1: #21 253.2 npm verb unfinished npm timer reifyNode:node_modules/debug 1708383591326
Step #1: #21 253.2 npm verb unfinished npm timer reifyNode:node_modules/core-util-is 1708383591329
Step #1: #21 253.2 npm verb unfinished npm timer reifyNode:node_modules/concat-map 1708383591331
Step #1: #21 253.2 npm verb unfinished npm timer reifyNode:node_modules/color-name 1708383591332
Step #1: #21 253.2 npm verb unfinished npm timer reifyNode:node_modules/color-convert 1708383591334
Step #1: #21 253.2 npm verb unfinished npm timer reifyNode:node_modules/cliui 1708383591335
Step #1: #21 253.2 npm verb code 1
Step #1: #21 253.3 
Step #1: #21 253.3 npm ERR! A complete log of this run can be found in: /home/builder/.npm/_logs/2024-02-19T22_59_17_047Z-debug-0.log
Step #1: #21 ERROR: executor failed running [/bin/sh -c secrets2env npm install --loglevel verbose node-expat]: exit code: 1
Step #1: ------
Step #1:  > [builder 14/16] RUN --mount=type=ssh     --mount=type=secret,id=NPM_TOKEN,uid=1000     secrets2env npm install --loglevel verbose node-expat:
Step #1: #21 253.2 npm verb unfinished npm timer reifyNode:node_modules/decamelize 1708383591325
Step #1: #21 253.2 npm verb unfinished npm timer reifyNode:node_modules/debug 1708383591326
Step #1: #21 253.2 npm verb unfinished npm timer reifyNode:node_modules/core-util-is 1708383591329
Step #1: #21 253.2 npm verb unfinished npm timer reifyNode:node_modules/concat-map 1708383591331
Step #1: #21 253.2 npm verb unfinished npm timer reifyNode:node_modules/color-name 1708383591332
Step #1: #21 253.2 npm verb unfinished npm timer reifyNode:node_modules/color-convert 1708383591334
Step #1: #21 253.2 npm verb unfinished npm timer reifyNode:node_modules/cliui 1708383591335
Step #1: #21 253.2 npm verb code 1
Step #1: #21 253.3 
Step #1: #21 253.3 npm ERR! A complete log of this run can be found in: /home/builder/.npm/_logs/2024-02-19T22_59_17_047Z-debug-0.log
Step #1: ------
Step #1: error: failed to solve: executor failed running [/bin/sh -c secrets2env npm install --loglevel verbose node-expat]: exit code: 1
Finished Step #1

@bffrost
Copy link

bffrost commented Mar 29, 2024

We've recently started seeing this issue too after picking up an update from node v18.19.1 to v18.20.0 which included an update of npm from 10.2.4 to 10.5.0.

Same symptoms, where this only seems to appear in the slow multi-platform ARM build from a linux/amd64 build machine.

repo: https://github.com/mcneilco/acas

Error:

> [linux/arm64 10/18] RUN     npm install -g gulp@4.0.2 forever@3.0.4 coffeescript@2.5.1:
 ERR! code ECONNRESET
422.4 npm ERR! errno ECONNRESET
422.5 npm ERR! network request to https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.1.tgz failed, reason: socket hang up
422.5 npm ERR! network This is a problem related to network connectivity.
422.5 npm ERR! network In most cases you are behind a proxy or have bad network settings.
422.5 npm ERR! network 
422.5 npm ERR! network If you are behind a proxy, please make sure that the
422.5 npm ERR! network 'proxy' config is set properly.  See: 'npm help config'
423.0 
423.0 npm ERR! A complete log of this run can be found in: /root/.npm/_logs/2024-03-29T17_10_21_014Z-debug-0.log
------
Dockerfile:44
--------------------
  42 |     ENV     ACAS_SHARED /home/runner/acas_shared
  43 |     ENV     APACHE Redhat
  44 | >>> RUN     npm install -g gulp@4.0.2 forever@3.0.4 coffeescript@2.5.1
  45 |     COPY    --chown=runner:runner package.json $ACAS_BASE/package.json
  46 |     USER    runner
--------------------
ERROR: failed to solve: process "/bin/sh -c npm install -g gulp@4.0.2 forever@3.0.4 coffeescript@2.5.1" did not complete successfully: exit code: 1

@bpatrik
Copy link

bpatrik commented Apr 17, 2024

We also seen the same issue:

some logs:


#37 [linux/arm64 builder 5/6] RUN npm install --unsafe-perm --fetch-timeout=90000
#37 904.0 npm notice 
#37 904.0 npm notice New patch version of npm available! 10.5.0 -> 10.5.2
#37 904.0 npm notice Changelog: <https://github.com/npm/cli/releases/tag/v10.5.2>
#37 904.0 npm notice Run `npm install -g npm@10.5.2` to update!
#37 904.0 npm notice 
#37 904.1 npm ERR! code ECONNRESET
#37 904.1 npm ERR! errno ECONNRESET
#37 904.2 npm ERR! network request to https://registry.npmjs.org/parse5/-/parse5-6.0.1.tgz failed, reason: Client network socket disconnected before secure TLS connection was established
#37 904.2 npm ERR! network This is a problem related to network connectivity.
#37 904.2 npm ERR! network In most cases you are behind a proxy or have bad network settings.
#37 904.2 npm ERR! network 
#37 904.2 npm ERR! network If you are behind a proxy, please make sure that the
#37 904.2 npm ERR! network 'proxy' config is set properly.  See: 'npm help config'
#37 904.5 
#37 904.5 npm ERR! A complete log of this run can be found in: /root/.npm/_logs/2024-04-17T18_26_12_645Z-debug-0.log
#37 ERROR: process "/bin/sh -c npm install --unsafe-perm --fetch-timeout=90000" did not complete successfully: exit code: 1
------
 > [linux/arm64 builder 5/6] RUN npm install --unsafe-perm --fetch-timeout=90000:
 ERR! network request to https://registry.npmjs.org/parse5/-/parse5-6.0.1.tgz failed, reason: Client network socket disconnected before secure TLS connection was established
904.2 npm ERR! network This is a problem related to network connectivity.
904.2 npm ERR! network In most cases you are behind a proxy or have bad network settings.
904.2 npm ERR! network 
904.2 npm ERR! network If you are behind a proxy, please make sure that the
904.2 npm ERR! network 'proxy' config is set properly.  See: 'npm help config'
904.5 
904.5 npm ERR! A complete log of this run can be found in: /root/.npm/_logs/2024-04-17T18_26_12_645Z-debug-0.log
------
WARNING: No output specified with docker-container driver. Build result will only remain in the build cache. To push result image into registry use --push or to load image into docker use --load
Dockerfile.build:7
--------------------
   5 |     COPY pigallery2-release /app
   6 |     WORKDIR /app
   7 | >>> RUN npm install --unsafe-perm --fetch-timeout=90000
   8 |     RUN mkdir -p /app/data/config && \
   9 |         mkdir -p /app/data/db && \
--------------------
ERROR: failed to solve: process "/bin/sh -c npm install --unsafe-perm --fetch-timeout=90000" did not complete successfully: exit code: 1
Error: buildx failed with: ERROR: failed to solve: process "/bin/sh -c npm install --unsafe-perm --fetch-timeout=90000" did not complete successfully: exit code: 1

Docker file used for the build: https://github.com/bpatrik/pigallery2/blob/e50861fce45899539f07dca32e44ecb30f46cf39/docker/debian-bullseye/Dockerfile.build

using dockerx to build for arm64.

This only happens on arm64 and only with debian. Works with alpine.

Locking docker image to node:18.19-buster solved the issue.

@bffrost
Copy link

bffrost commented Apr 17, 2024

This issue may be a duplicate / other symptom of #7072 which has been fixed in npm 10.5.1. We were able to explicitly install a later npm version and get around these build failures.
RUN npm install npm@10.5.1 -g

SmartManoj added a commit to SmartManoj/Kevin that referenced this issue Apr 24, 2024
SmartManoj added a commit to SmartManoj/Kevin that referenced this issue Apr 24, 2024
rbren pushed a commit to OpenDevin/OpenDevin that referenced this issue Apr 24, 2024
* npm patch

npm/cli#7231 (comment)

* Delete huge unnecessary tools folder
@melroy89
Copy link

And hopefully fixed in: nodejs/node#52505

@tlbdk
Copy link
Author

tlbdk commented Apr 29, 2024

Tested that with 10.5.2 that it fixed the issue.

@tlbdk tlbdk closed this as completed Apr 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug thing that needs fixing Needs Triage needs review for next steps Release 10.x
Projects
None yet
Development

No branches or pull requests

4 participants