Fails on Windows when tarPath is overridden manually #1924

Description

@s100
  • Node Version: 10.16.3, npm version 6.9.0, node-gyp version 3.8.0
  • Platform: Windows
  • Compiler:
  • Module: appmetrics
Verbose output (from npm or node-gyp):
gyp verb tarball done parsing tarball
gyp verb on Windows; need to download `node.lib`...
gyp verb 32-bit node.lib dir C:\Users\s100\.node-gyp\10.16.3\ia32
gyp verb 64-bit node.lib dir C:\Users\s100\.node-gyp\10.16.3\x64
gyp verb `node.lib` 32-bit url https://nodejs.org/download/release/v10.16.3/win-x86/node.lib
gyp verb `node.lib` 64-bit url https://nodejs.org/download/release/v10.16.3/win-x64/node.lib
gyp verb streaming 32-bit node.lib to: C:\Users\s100\.node-gyp\10.16.3\ia32\node.lib
gyp http GET https://nodejs.org/download/release/v10.16.3/win-x86/node.lib
gyp verb streaming 64-bit node.lib to: C:\Users\s100\.node-gyp\10.16.3\x64\node.lib
gyp http GET https://nodejs.org/download/release/v10.16.3/win-x64/node.lib
gyp http 200 https://nodejs.org/download/release/v10.16.3/win-x64/node.lib
gyp http 200 https://nodejs.org/download/release/v10.16.3/win-x86/node.lib
gyp verb content checksum win-x64/node.lib 9f10cd25d27fc31f8fe8f5fcc5e9f27a8ba5bb79dc0791dc0df102f063c0066e
gyp verb content checksum win-x86/node.lib 459095d9bd9dc4e2d12c4284e6fc5bdc78eec8181c8327c57876499b002a59fd
gyp verb download contents checksum {"win-x64/node.lib":"9f10cd25d27fc31f8fe8f5fcc5e9f27a8ba5bb79dc0791dc0df102f063c0066e","win-x86/node.lib":"459095d9bd9dc4e2d12c4284e6fc5bdc78eec8181c8327c57876499b002a59fd"}
gyp verb validating download checksum for win-x64/node.lib (9f10cd25d27fc31f8fe8f5fcc5e9f27a8ba5bb79dc0791dc0df102f063c0066e == undefined)
gyp WARN install got an error, rolling back install

We are installing appmetrics, a package requiring the compilation of native code, on Windows. We have the location of the Node.js headers tarball overridden, so instead of curling https://nodejs.org/dist/v10.16.3/node-v10.16.3-headers.tar.gz, we have done something like npm config set tarball C:\node-v10.16.3-headers.tar.gz, as suggested in #1133.

From the code we see that if we are on Windows and have overridden the tarball location by setting tarPath, node-gyp:

  1. downloads node.lib, populating contentShasums with its SHA256 hash (downloadNodeLib)
  2. does not download expected SHA256 sums and populate expectShasums (downloadShaSums, which is not called)
  3. still compares the two SHA256 sums (deref) - so it compares a valid SHA256 with undefined and fails.

Compare with this output if I npm config delete tarball:

when it works
gyp verb tarball done parsing tarball
gyp verb on Windows; need to download `node.lib`...
gyp verb 32-bit node.lib dir C:\Users\s100\.node-gyp\10.16.3\ia32
gyp verb 64-bit node.lib dir C:\Users\s100\.node-gyp\10.16.3\x64
gyp verb `node.lib` 32-bit url https://nodejs.org/download/release/v10.16.3/win-x86/node.lib
gyp verb `node.lib` 64-bit url https://nodejs.org/download/release/v10.16.3/win-x64/node.lib
gyp verb check download content checksum, need to download `SHASUMS256.txt`...
gyp verb checksum url https://nodejs.org/download/release/v10.16.3/SHASUMS256.txt
gyp http GET https://nodejs.org/download/release/v10.16.3/SHASUMS256.txt
gyp verb streaming 64-bit node.lib to: C:\Users\s100\.node-gyp\10.16.3\x64\node.lib
gyp http GET https://nodejs.org/download/release/v10.16.3/win-x64/node.lib
gyp verb streaming 32-bit node.lib to: C:\Users\s100\.node-gyp\10.16.3\ia32\node.lib
gyp http GET https://nodejs.org/download/release/v10.16.3/win-x86/node.lib
gyp http 200 https://nodejs.org/download/release/v10.16.3/SHASUMS256.txt
gyp verb checksum data {"node-v10.16.3-aix-ppc64.tar.gz":"1e246436e177d69354b5e3ea47579a03b68d7b61a2565972c18c3a4cb5d8ee33","node-v10.16.3-darwin-x64.tar.gz":"6febc571e1543c2845fa919c6d06b36a24e4e142c91aedbe28b6ff7d296119e4","node-v10.16.3-darwin-x64.tar.xz":"1d5ce05abf39ef482c2c3eaf16c1f4edb01314308066871d3dfc99e95701b19b","node-v10.16.3-headers.tar.gz":"0901d1f1bfe0f5d922f9d79c5822a3624c11eb0f2de9fd552425bc98c7b95e54","node-v10.16.3-headers.tar.xz":"6ceb3249ac26a098c943de8104c19d7ea5a540b02db8652b80ab54deed1e5848","node-v10.16.3-linux-arm64.tar.gz":"3bab16e7107092e43426e082ee9fd88ef0a43a35816f662f14563bcc5152600d","node-v10.16.3-linux-arm64.tar.xz":"8ee77bad022bd460bf2867a97bf56ce7ddc4aa2ace067e45995fb1721a958428","node-v10.16.3-linux-armv6l.tar.gz":"c4ce8f8627c4d0d71647987924e5369cd1adeef2865bf1bdbb4387b75fba804b","node-v10.16.3-linux-armv6l.tar.xz":"17b6ea87cde13c330a72c44be8a30ebebf83c7c71d1a1b92e1d629f273fa0743","node-v10.16.3-linux-armv7l.tar.gz":"f267710728ca56ca3b522076fff808540ea27d6aa5fd586bc0ad39c389530c3b","node-v10.16.3-linux-armv7l.tar.xz":"4a6f27308cd0cea136be6f5f7c194b0faabea016efe844fb1452c846d2eca7b1","node-v10.16.3-linux-ppc64le.tar.gz":"3e0f41b3cb991f062e1c93a297675af34d1a2f29052306cd585f1f5e25ea9159","node-v10.16.3-linux-ppc64le.tar.xz":"b51731b49f6816f5e3e670c399611eb9386f558cc2d597301fb73e585640a642","node-v10.16.3-linux-s390x.tar.gz":"ae87fa499fd5fd9d86d4f788cb4e54bd3eb4fdb735b20235537e9d38ae5da73b","node-v10.16.3-linux-s390x.tar.xz":"90cc57506c98cd5561f5dda9e103fa70083242fff2b1a39a5351fc15ff63db46","node-v10.16.3-linux-x64.tar.gz":"2f0397bb81c1d0c9901b9aff82a933257bf60f3992227b86107111a75b9030d9","node-v10.16.3-linux-x64.tar.xz":"d2271fd8cf997fa7447d638dfa92749ff18ca4b0d796bf89f2a82bf7800d5506","node-v10.16.3.pkg":"1c820559780c7a5b90ceebd819afce58f3c14805191141fbd59feb8485c2fc73","node-v10.16.3-sunos-x64.tar.gz":"d8f2418b748c4c9b1d8c1dc008b42384ca87c4c4c134df3a3009e6b7546f8b23","node-v10.16.3-sunos-x64.tar.xz":"2952da9d127c3f72fe5b3e466fbfe8a45ab3ef63263d881da7e9b586559f3693","node-v10.16.3.tar.gz":"db5a5e03a815b84a1266a4b48bb6a6d887175705f84fd2472f0d28e5e305a1f8","node-v10.16.3.tar.xz":"7bf1123d7415964775b8f81fe6ec6dd5c3c08abb42bb71dfe4409dbeeba26bbd","node-v10.16.3-win-x64.7z":"c2cc3b95d6e8504b20623cfe74f848d1ebc2f43a262e7bae14bee64db2b13889","node-v10.16.3-win-x64.zip":"19aa47de7c5950d7bd71a1e878013b98d93871cc311d7185f5472e6d3f633146","node-v10.16.3-win-x86.7z":"fc1ccb1e6f12fe68e816c552e6b1df289a8bfe064c025eb62c360bd041da4a5f","node-v10.16.3-win-x86.zip":"02a30a17c25c354747ac76fd130ff5495dde2f60f0a21ad675526951c2d7a52a","node-v10.16.3-x64.msi":"f68b75eea46232adb8fd38126c977dc244166d29e7c6cd2df930b460c38590a9","node-v10.16.3-x86.msi":"b3cf18ad447d177cf858dbe45751100846cad96ba7497cd7c1850a616758e67f","win-x64/node.exe":"cb8f5c1981e11a3d438b6867df5fb8e4f77cd29ddc0856d99b62060ef991c649","win-x64/node.lib":"9f10cd25d27fc31f8fe8f5fcc5e9f27a8ba5bb79dc0791dc0df102f063c0066e","win-x64/node_pdb.7z":"654d350ee101cbb4a0246e5226169f99af763a4d4c14546370ec6dfb09cf5a47","win-x64/node_pdb.zip":"426f326d88b5a184cc74ba50f5106eca933cb3386f872ffeb5844f3916296c09","win-x86/node.exe":"78b71fd2fb792c5f24848a05119d50d02407675a54a72caf0e40b039a43fefdd","win-x86/node.lib":"459095d9bd9dc4e2d12c4284e6fc5bdc78eec8181c8327c57876499b002a59fd","win-x86/node_pdb.7z":"1d0bb57a74e836835a1f9b8c1e0bf2493d4bd095c81a8e12d05cbfbf8c363534","win-x86/node_pdb.zip":"e2b5ea28cbe965e074e61035b559efda9312044ac5d0346243c041bbb62cea73"}
gyp http 200 https://nodejs.org/download/release/v10.16.3/win-x64/node.lib
gyp http 200 https://nodejs.org/download/release/v10.16.3/win-x86/node.lib
gyp verb content checksum win-x64/node.lib 9f10cd25d27fc31f8fe8f5fcc5e9f27a8ba5bb79dc0791dc0df102f063c0066e
gyp verb content checksum win-x86/node.lib 459095d9bd9dc4e2d12c4284e6fc5bdc78eec8181c8327c57876499b002a59fd
gyp verb download contents checksum {"node-v10.16.3-headers.tar.gz":"0901d1f1bfe0f5d922f9d79c5822a3624c11eb0f2de9fd552425bc98c7b95e54","win-x64/node.lib":"9f10cd25d27fc31f8fe8f5fcc5e9f27a8ba5bb79dc0791dc0df102f063c0066e","win-x86/node.lib":"459095d9bd9dc4e2d12c4284e6fc5bdc78eec8181c8327c57876499b002a59fd"}
gyp verb validating download checksum for node-v10.16.3-headers.tar.gz (0901d1f1bfe0f5d922f9d79c5822a3624c11eb0f2de9fd552425bc98c7b95e54 == 0901d1f1bfe0f5d922f9d79c5822a3624c11eb0f2de9fd552425bc98c7b95e54)
gyp verb validating download checksum for win-x64/node.lib (9f10cd25d27fc31f8fe8f5fcc5e9f27a8ba5bb79dc0791dc0df102f063c0066e == 9f10cd25d27fc31f8fe8f5fcc5e9f27a8ba5bb79dc0791dc0df102f063c0066e)
gyp verb validating download checksum for win-x86/node.lib (459095d9bd9dc4e2d12c4284e6fc5bdc78eec8181c8327c57876499b002a59fd == 459095d9bd9dc4e2d12c4284e6fc5bdc78eec8181c8327c57876499b002a59fd)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      , 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Add copy buttons to all
       blocks\n(function() {\n function addCopyButtons() {\n document.querySelectorAll('pre code').forEach(function(codeBlock) {\n if (codeBlock.parentElement.hasAttribute('data-copy-added')) return;\n codeBlock.parentElement.setAttribute('data-copy-added', 'true');\n \n var btn = document.createElement('button');\n btn.textContent = 'Copy';\n btn.style.cssText = 'position:absolute;top:4px;right:4px;padding:2px 8px;font-size:11px;background:#4ecdc4;border:none;border-radius:4px;color:#1a1a2e;cursor:pointer;opacity:0.7;transition:opacity 0.2s;';\n btn.onmouseover = function() { this.style.opacity = '1'; };\n btn.onmouseout = function() { this.style.opacity = '0.7'; };\n btn.onclick = function() {\n navigator.clipboard.writeText(codeBlock.textContent).then(function() {\n btn.textContent = 'Copied!';\n setTimeout(function() { btn.textContent = 'Copy'; }, 1500);\n });\n };\n codeBlock.parentElement.style.position = 'relative';\n codeBlock.parentElement.appendChild(btn);\n });\n }\n \n addCopyButtons();\n \n // Re-run on dynamic content\n var observer = new MutationObserver(addCopyButtons);\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "Add Copy Buttons to Code Blocks");
      }
      } catch(__e) { console.warn('[Userscript:Add Copy Buttons to Code Blocks]', __e); }
      })();
      (function(){
      try {
      var __m = "github.com";
      var __re = new RegExp('^' + "github\\.com" + '
      
      Skip to content

      Fails on Windows when tarPath is overridden manually #1924

      Description

      @s100
      • Node Version: 10.16.3, npm version 6.9.0, node-gyp version 3.8.0
      • Platform: Windows
      • Compiler:
      • Module: appmetrics
      Verbose output (from npm or node-gyp):
      gyp verb tarball done parsing tarball
      gyp verb on Windows; need to download `node.lib`...
      gyp verb 32-bit node.lib dir C:\Users\s100\.node-gyp\10.16.3\ia32
      gyp verb 64-bit node.lib dir C:\Users\s100\.node-gyp\10.16.3\x64
      gyp verb `node.lib` 32-bit url https://nodejs.org/download/release/v10.16.3/win-x86/node.lib
      gyp verb `node.lib` 64-bit url https://nodejs.org/download/release/v10.16.3/win-x64/node.lib
      gyp verb streaming 32-bit node.lib to: C:\Users\s100\.node-gyp\10.16.3\ia32\node.lib
      gyp http GET https://nodejs.org/download/release/v10.16.3/win-x86/node.lib
      gyp verb streaming 64-bit node.lib to: C:\Users\s100\.node-gyp\10.16.3\x64\node.lib
      gyp http GET https://nodejs.org/download/release/v10.16.3/win-x64/node.lib
      gyp http 200 https://nodejs.org/download/release/v10.16.3/win-x64/node.lib
      gyp http 200 https://nodejs.org/download/release/v10.16.3/win-x86/node.lib
      gyp verb content checksum win-x64/node.lib 9f10cd25d27fc31f8fe8f5fcc5e9f27a8ba5bb79dc0791dc0df102f063c0066e
      gyp verb content checksum win-x86/node.lib 459095d9bd9dc4e2d12c4284e6fc5bdc78eec8181c8327c57876499b002a59fd
      gyp verb download contents checksum {"win-x64/node.lib":"9f10cd25d27fc31f8fe8f5fcc5e9f27a8ba5bb79dc0791dc0df102f063c0066e","win-x86/node.lib":"459095d9bd9dc4e2d12c4284e6fc5bdc78eec8181c8327c57876499b002a59fd"}
      gyp verb validating download checksum for win-x64/node.lib (9f10cd25d27fc31f8fe8f5fcc5e9f27a8ba5bb79dc0791dc0df102f063c0066e == undefined)
      gyp WARN install got an error, rolling back install
      

      We are installing appmetrics, a package requiring the compilation of native code, on Windows. We have the location of the Node.js headers tarball overridden, so instead of curling https://nodejs.org/dist/v10.16.3/node-v10.16.3-headers.tar.gz, we have done something like npm config set tarball C:\node-v10.16.3-headers.tar.gz, as suggested in #1133.

      From the code we see that if we are on Windows and have overridden the tarball location by setting tarPath, node-gyp:

      1. downloads node.lib, populating contentShasums with its SHA256 hash (downloadNodeLib)
      2. does not download expected SHA256 sums and populate expectShasums (downloadShaSums, which is not called)
      3. still compares the two SHA256 sums (deref) - so it compares a valid SHA256 with undefined and fails.

      Compare with this output if I npm config delete tarball:

      when it works
      gyp verb tarball done parsing tarball
      gyp verb on Windows; need to download `node.lib`...
      gyp verb 32-bit node.lib dir C:\Users\s100\.node-gyp\10.16.3\ia32
      gyp verb 64-bit node.lib dir C:\Users\s100\.node-gyp\10.16.3\x64
      gyp verb `node.lib` 32-bit url https://nodejs.org/download/release/v10.16.3/win-x86/node.lib
      gyp verb `node.lib` 64-bit url https://nodejs.org/download/release/v10.16.3/win-x64/node.lib
      gyp verb check download content checksum, need to download `SHASUMS256.txt`...
      gyp verb checksum url https://nodejs.org/download/release/v10.16.3/SHASUMS256.txt
      gyp http GET https://nodejs.org/download/release/v10.16.3/SHASUMS256.txt
      gyp verb streaming 64-bit node.lib to: C:\Users\s100\.node-gyp\10.16.3\x64\node.lib
      gyp http GET https://nodejs.org/download/release/v10.16.3/win-x64/node.lib
      gyp verb streaming 32-bit node.lib to: C:\Users\s100\.node-gyp\10.16.3\ia32\node.lib
      gyp http GET https://nodejs.org/download/release/v10.16.3/win-x86/node.lib
      gyp http 200 https://nodejs.org/download/release/v10.16.3/SHASUMS256.txt
      gyp verb checksum data {"node-v10.16.3-aix-ppc64.tar.gz":"1e246436e177d69354b5e3ea47579a03b68d7b61a2565972c18c3a4cb5d8ee33","node-v10.16.3-darwin-x64.tar.gz":"6febc571e1543c2845fa919c6d06b36a24e4e142c91aedbe28b6ff7d296119e4","node-v10.16.3-darwin-x64.tar.xz":"1d5ce05abf39ef482c2c3eaf16c1f4edb01314308066871d3dfc99e95701b19b","node-v10.16.3-headers.tar.gz":"0901d1f1bfe0f5d922f9d79c5822a3624c11eb0f2de9fd552425bc98c7b95e54","node-v10.16.3-headers.tar.xz":"6ceb3249ac26a098c943de8104c19d7ea5a540b02db8652b80ab54deed1e5848","node-v10.16.3-linux-arm64.tar.gz":"3bab16e7107092e43426e082ee9fd88ef0a43a35816f662f14563bcc5152600d","node-v10.16.3-linux-arm64.tar.xz":"8ee77bad022bd460bf2867a97bf56ce7ddc4aa2ace067e45995fb1721a958428","node-v10.16.3-linux-armv6l.tar.gz":"c4ce8f8627c4d0d71647987924e5369cd1adeef2865bf1bdbb4387b75fba804b","node-v10.16.3-linux-armv6l.tar.xz":"17b6ea87cde13c330a72c44be8a30ebebf83c7c71d1a1b92e1d629f273fa0743","node-v10.16.3-linux-armv7l.tar.gz":"f267710728ca56ca3b522076fff808540ea27d6aa5fd586bc0ad39c389530c3b","node-v10.16.3-linux-armv7l.tar.xz":"4a6f27308cd0cea136be6f5f7c194b0faabea016efe844fb1452c846d2eca7b1","node-v10.16.3-linux-ppc64le.tar.gz":"3e0f41b3cb991f062e1c93a297675af34d1a2f29052306cd585f1f5e25ea9159","node-v10.16.3-linux-ppc64le.tar.xz":"b51731b49f6816f5e3e670c399611eb9386f558cc2d597301fb73e585640a642","node-v10.16.3-linux-s390x.tar.gz":"ae87fa499fd5fd9d86d4f788cb4e54bd3eb4fdb735b20235537e9d38ae5da73b","node-v10.16.3-linux-s390x.tar.xz":"90cc57506c98cd5561f5dda9e103fa70083242fff2b1a39a5351fc15ff63db46","node-v10.16.3-linux-x64.tar.gz":"2f0397bb81c1d0c9901b9aff82a933257bf60f3992227b86107111a75b9030d9","node-v10.16.3-linux-x64.tar.xz":"d2271fd8cf997fa7447d638dfa92749ff18ca4b0d796bf89f2a82bf7800d5506","node-v10.16.3.pkg":"1c820559780c7a5b90ceebd819afce58f3c14805191141fbd59feb8485c2fc73","node-v10.16.3-sunos-x64.tar.gz":"d8f2418b748c4c9b1d8c1dc008b42384ca87c4c4c134df3a3009e6b7546f8b23","node-v10.16.3-sunos-x64.tar.xz":"2952da9d127c3f72fe5b3e466fbfe8a45ab3ef63263d881da7e9b586559f3693","node-v10.16.3.tar.gz":"db5a5e03a815b84a1266a4b48bb6a6d887175705f84fd2472f0d28e5e305a1f8","node-v10.16.3.tar.xz":"7bf1123d7415964775b8f81fe6ec6dd5c3c08abb42bb71dfe4409dbeeba26bbd","node-v10.16.3-win-x64.7z":"c2cc3b95d6e8504b20623cfe74f848d1ebc2f43a262e7bae14bee64db2b13889","node-v10.16.3-win-x64.zip":"19aa47de7c5950d7bd71a1e878013b98d93871cc311d7185f5472e6d3f633146","node-v10.16.3-win-x86.7z":"fc1ccb1e6f12fe68e816c552e6b1df289a8bfe064c025eb62c360bd041da4a5f","node-v10.16.3-win-x86.zip":"02a30a17c25c354747ac76fd130ff5495dde2f60f0a21ad675526951c2d7a52a","node-v10.16.3-x64.msi":"f68b75eea46232adb8fd38126c977dc244166d29e7c6cd2df930b460c38590a9","node-v10.16.3-x86.msi":"b3cf18ad447d177cf858dbe45751100846cad96ba7497cd7c1850a616758e67f","win-x64/node.exe":"cb8f5c1981e11a3d438b6867df5fb8e4f77cd29ddc0856d99b62060ef991c649","win-x64/node.lib":"9f10cd25d27fc31f8fe8f5fcc5e9f27a8ba5bb79dc0791dc0df102f063c0066e","win-x64/node_pdb.7z":"654d350ee101cbb4a0246e5226169f99af763a4d4c14546370ec6dfb09cf5a47","win-x64/node_pdb.zip":"426f326d88b5a184cc74ba50f5106eca933cb3386f872ffeb5844f3916296c09","win-x86/node.exe":"78b71fd2fb792c5f24848a05119d50d02407675a54a72caf0e40b039a43fefdd","win-x86/node.lib":"459095d9bd9dc4e2d12c4284e6fc5bdc78eec8181c8327c57876499b002a59fd","win-x86/node_pdb.7z":"1d0bb57a74e836835a1f9b8c1e0bf2493d4bd095c81a8e12d05cbfbf8c363534","win-x86/node_pdb.zip":"e2b5ea28cbe965e074e61035b559efda9312044ac5d0346243c041bbb62cea73"}
      gyp http 200 https://nodejs.org/download/release/v10.16.3/win-x64/node.lib
      gyp http 200 https://nodejs.org/download/release/v10.16.3/win-x86/node.lib
      gyp verb content checksum win-x64/node.lib 9f10cd25d27fc31f8fe8f5fcc5e9f27a8ba5bb79dc0791dc0df102f063c0066e
      gyp verb content checksum win-x86/node.lib 459095d9bd9dc4e2d12c4284e6fc5bdc78eec8181c8327c57876499b002a59fd
      gyp verb download contents checksum {"node-v10.16.3-headers.tar.gz":"0901d1f1bfe0f5d922f9d79c5822a3624c11eb0f2de9fd552425bc98c7b95e54","win-x64/node.lib":"9f10cd25d27fc31f8fe8f5fcc5e9f27a8ba5bb79dc0791dc0df102f063c0066e","win-x86/node.lib":"459095d9bd9dc4e2d12c4284e6fc5bdc78eec8181c8327c57876499b002a59fd"}
      gyp verb validating download checksum for node-v10.16.3-headers.tar.gz (0901d1f1bfe0f5d922f9d79c5822a3624c11eb0f2de9fd552425bc98c7b95e54 == 0901d1f1bfe0f5d922f9d79c5822a3624c11eb0f2de9fd552425bc98c7b95e54)
      gyp verb validating download checksum for win-x64/node.lib (9f10cd25d27fc31f8fe8f5fcc5e9f27a8ba5bb79dc0791dc0df102f063c0066e == 9f10cd25d27fc31f8fe8f5fcc5e9f27a8ba5bb79dc0791dc0df102f063c0066e)
      gyp verb validating download checksum for win-x86/node.lib (459095d9bd9dc4e2d12c4284e6fc5bdc78eec8181c8327c57876499b002a59fd == 459095d9bd9dc4e2d12c4284e6fc5bdc78eec8181c8327c57876499b002a59fd)
      

      Metadata

      Metadata

      Assignees

      No one assigned

        Labels

        No labels
        No labels

        Type

        No type

        Projects

        No projects

          Milestone

          No milestone

          Relationships

          None yet

          Development

          No branches or pull requests

          Issue actions

          , 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Force GitHub README to respect dark mode\n(function() {\n var style = document.createElement('style');\n style.textContent = '\n .markdown-body {\n color-scheme: dark light;\n }\n .markdown-body pre { background: #161b22 !important; }\n .markdown-body code { background: rgba(110, 118, 129, 0.4) !important; }\n .markdown-body table th, .markdown-body table td { border-color: #30363d !important; }\n .markdown-body img { background: #0d1117; }\n .markdown-body blockquote { border-left-color: #8b949e; }\n .markdown-body hr { border-color: #30363d; }\n ';\n document.head.appendChild(style);\n})();", "GitHub Dark Mode README Fix"); } } catch(__e) { console.warn('[Userscript:GitHub Dark Mode README Fix]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
          Skip to content

          Fails on Windows when tarPath is overridden manually #1924

          Description

          @s100
          • Node Version: 10.16.3, npm version 6.9.0, node-gyp version 3.8.0
          • Platform: Windows
          • Compiler:
          • Module: appmetrics
          Verbose output (from npm or node-gyp):
          gyp verb tarball done parsing tarball
          gyp verb on Windows; need to download `node.lib`...
          gyp verb 32-bit node.lib dir C:\Users\s100\.node-gyp\10.16.3\ia32
          gyp verb 64-bit node.lib dir C:\Users\s100\.node-gyp\10.16.3\x64
          gyp verb `node.lib` 32-bit url https://nodejs.org/download/release/v10.16.3/win-x86/node.lib
          gyp verb `node.lib` 64-bit url https://nodejs.org/download/release/v10.16.3/win-x64/node.lib
          gyp verb streaming 32-bit node.lib to: C:\Users\s100\.node-gyp\10.16.3\ia32\node.lib
          gyp http GET https://nodejs.org/download/release/v10.16.3/win-x86/node.lib
          gyp verb streaming 64-bit node.lib to: C:\Users\s100\.node-gyp\10.16.3\x64\node.lib
          gyp http GET https://nodejs.org/download/release/v10.16.3/win-x64/node.lib
          gyp http 200 https://nodejs.org/download/release/v10.16.3/win-x64/node.lib
          gyp http 200 https://nodejs.org/download/release/v10.16.3/win-x86/node.lib
          gyp verb content checksum win-x64/node.lib 9f10cd25d27fc31f8fe8f5fcc5e9f27a8ba5bb79dc0791dc0df102f063c0066e
          gyp verb content checksum win-x86/node.lib 459095d9bd9dc4e2d12c4284e6fc5bdc78eec8181c8327c57876499b002a59fd
          gyp verb download contents checksum {"win-x64/node.lib":"9f10cd25d27fc31f8fe8f5fcc5e9f27a8ba5bb79dc0791dc0df102f063c0066e","win-x86/node.lib":"459095d9bd9dc4e2d12c4284e6fc5bdc78eec8181c8327c57876499b002a59fd"}
          gyp verb validating download checksum for win-x64/node.lib (9f10cd25d27fc31f8fe8f5fcc5e9f27a8ba5bb79dc0791dc0df102f063c0066e == undefined)
          gyp WARN install got an error, rolling back install
          

          We are installing appmetrics, a package requiring the compilation of native code, on Windows. We have the location of the Node.js headers tarball overridden, so instead of curling https://nodejs.org/dist/v10.16.3/node-v10.16.3-headers.tar.gz, we have done something like npm config set tarball C:\node-v10.16.3-headers.tar.gz, as suggested in #1133.

          From the code we see that if we are on Windows and have overridden the tarball location by setting tarPath, node-gyp:

          1. downloads node.lib, populating contentShasums with its SHA256 hash (downloadNodeLib)
          2. does not download expected SHA256 sums and populate expectShasums (downloadShaSums, which is not called)
          3. still compares the two SHA256 sums (deref) - so it compares a valid SHA256 with undefined and fails.

          Compare with this output if I npm config delete tarball:

          when it works
          gyp verb tarball done parsing tarball
          gyp verb on Windows; need to download `node.lib`...
          gyp verb 32-bit node.lib dir C:\Users\s100\.node-gyp\10.16.3\ia32
          gyp verb 64-bit node.lib dir C:\Users\s100\.node-gyp\10.16.3\x64
          gyp verb `node.lib` 32-bit url https://nodejs.org/download/release/v10.16.3/win-x86/node.lib
          gyp verb `node.lib` 64-bit url https://nodejs.org/download/release/v10.16.3/win-x64/node.lib
          gyp verb check download content checksum, need to download `SHASUMS256.txt`...
          gyp verb checksum url https://nodejs.org/download/release/v10.16.3/SHASUMS256.txt
          gyp http GET https://nodejs.org/download/release/v10.16.3/SHASUMS256.txt
          gyp verb streaming 64-bit node.lib to: C:\Users\s100\.node-gyp\10.16.3\x64\node.lib
          gyp http GET https://nodejs.org/download/release/v10.16.3/win-x64/node.lib
          gyp verb streaming 32-bit node.lib to: C:\Users\s100\.node-gyp\10.16.3\ia32\node.lib
          gyp http GET https://nodejs.org/download/release/v10.16.3/win-x86/node.lib
          gyp http 200 https://nodejs.org/download/release/v10.16.3/SHASUMS256.txt
          gyp verb checksum data {"node-v10.16.3-aix-ppc64.tar.gz":"1e246436e177d69354b5e3ea47579a03b68d7b61a2565972c18c3a4cb5d8ee33","node-v10.16.3-darwin-x64.tar.gz":"6febc571e1543c2845fa919c6d06b36a24e4e142c91aedbe28b6ff7d296119e4","node-v10.16.3-darwin-x64.tar.xz":"1d5ce05abf39ef482c2c3eaf16c1f4edb01314308066871d3dfc99e95701b19b","node-v10.16.3-headers.tar.gz":"0901d1f1bfe0f5d922f9d79c5822a3624c11eb0f2de9fd552425bc98c7b95e54","node-v10.16.3-headers.tar.xz":"6ceb3249ac26a098c943de8104c19d7ea5a540b02db8652b80ab54deed1e5848","node-v10.16.3-linux-arm64.tar.gz":"3bab16e7107092e43426e082ee9fd88ef0a43a35816f662f14563bcc5152600d","node-v10.16.3-linux-arm64.tar.xz":"8ee77bad022bd460bf2867a97bf56ce7ddc4aa2ace067e45995fb1721a958428","node-v10.16.3-linux-armv6l.tar.gz":"c4ce8f8627c4d0d71647987924e5369cd1adeef2865bf1bdbb4387b75fba804b","node-v10.16.3-linux-armv6l.tar.xz":"17b6ea87cde13c330a72c44be8a30ebebf83c7c71d1a1b92e1d629f273fa0743","node-v10.16.3-linux-armv7l.tar.gz":"f267710728ca56ca3b522076fff808540ea27d6aa5fd586bc0ad39c389530c3b","node-v10.16.3-linux-armv7l.tar.xz":"4a6f27308cd0cea136be6f5f7c194b0faabea016efe844fb1452c846d2eca7b1","node-v10.16.3-linux-ppc64le.tar.gz":"3e0f41b3cb991f062e1c93a297675af34d1a2f29052306cd585f1f5e25ea9159","node-v10.16.3-linux-ppc64le.tar.xz":"b51731b49f6816f5e3e670c399611eb9386f558cc2d597301fb73e585640a642","node-v10.16.3-linux-s390x.tar.gz":"ae87fa499fd5fd9d86d4f788cb4e54bd3eb4fdb735b20235537e9d38ae5da73b","node-v10.16.3-linux-s390x.tar.xz":"90cc57506c98cd5561f5dda9e103fa70083242fff2b1a39a5351fc15ff63db46","node-v10.16.3-linux-x64.tar.gz":"2f0397bb81c1d0c9901b9aff82a933257bf60f3992227b86107111a75b9030d9","node-v10.16.3-linux-x64.tar.xz":"d2271fd8cf997fa7447d638dfa92749ff18ca4b0d796bf89f2a82bf7800d5506","node-v10.16.3.pkg":"1c820559780c7a5b90ceebd819afce58f3c14805191141fbd59feb8485c2fc73","node-v10.16.3-sunos-x64.tar.gz":"d8f2418b748c4c9b1d8c1dc008b42384ca87c4c4c134df3a3009e6b7546f8b23","node-v10.16.3-sunos-x64.tar.xz":"2952da9d127c3f72fe5b3e466fbfe8a45ab3ef63263d881da7e9b586559f3693","node-v10.16.3.tar.gz":"db5a5e03a815b84a1266a4b48bb6a6d887175705f84fd2472f0d28e5e305a1f8","node-v10.16.3.tar.xz":"7bf1123d7415964775b8f81fe6ec6dd5c3c08abb42bb71dfe4409dbeeba26bbd","node-v10.16.3-win-x64.7z":"c2cc3b95d6e8504b20623cfe74f848d1ebc2f43a262e7bae14bee64db2b13889","node-v10.16.3-win-x64.zip":"19aa47de7c5950d7bd71a1e878013b98d93871cc311d7185f5472e6d3f633146","node-v10.16.3-win-x86.7z":"fc1ccb1e6f12fe68e816c552e6b1df289a8bfe064c025eb62c360bd041da4a5f","node-v10.16.3-win-x86.zip":"02a30a17c25c354747ac76fd130ff5495dde2f60f0a21ad675526951c2d7a52a","node-v10.16.3-x64.msi":"f68b75eea46232adb8fd38126c977dc244166d29e7c6cd2df930b460c38590a9","node-v10.16.3-x86.msi":"b3cf18ad447d177cf858dbe45751100846cad96ba7497cd7c1850a616758e67f","win-x64/node.exe":"cb8f5c1981e11a3d438b6867df5fb8e4f77cd29ddc0856d99b62060ef991c649","win-x64/node.lib":"9f10cd25d27fc31f8fe8f5fcc5e9f27a8ba5bb79dc0791dc0df102f063c0066e","win-x64/node_pdb.7z":"654d350ee101cbb4a0246e5226169f99af763a4d4c14546370ec6dfb09cf5a47","win-x64/node_pdb.zip":"426f326d88b5a184cc74ba50f5106eca933cb3386f872ffeb5844f3916296c09","win-x86/node.exe":"78b71fd2fb792c5f24848a05119d50d02407675a54a72caf0e40b039a43fefdd","win-x86/node.lib":"459095d9bd9dc4e2d12c4284e6fc5bdc78eec8181c8327c57876499b002a59fd","win-x86/node_pdb.7z":"1d0bb57a74e836835a1f9b8c1e0bf2493d4bd095c81a8e12d05cbfbf8c363534","win-x86/node_pdb.zip":"e2b5ea28cbe965e074e61035b559efda9312044ac5d0346243c041bbb62cea73"}
          gyp http 200 https://nodejs.org/download/release/v10.16.3/win-x64/node.lib
          gyp http 200 https://nodejs.org/download/release/v10.16.3/win-x86/node.lib
          gyp verb content checksum win-x64/node.lib 9f10cd25d27fc31f8fe8f5fcc5e9f27a8ba5bb79dc0791dc0df102f063c0066e
          gyp verb content checksum win-x86/node.lib 459095d9bd9dc4e2d12c4284e6fc5bdc78eec8181c8327c57876499b002a59fd
          gyp verb download contents checksum {"node-v10.16.3-headers.tar.gz":"0901d1f1bfe0f5d922f9d79c5822a3624c11eb0f2de9fd552425bc98c7b95e54","win-x64/node.lib":"9f10cd25d27fc31f8fe8f5fcc5e9f27a8ba5bb79dc0791dc0df102f063c0066e","win-x86/node.lib":"459095d9bd9dc4e2d12c4284e6fc5bdc78eec8181c8327c57876499b002a59fd"}
          gyp verb validating download checksum for node-v10.16.3-headers.tar.gz (0901d1f1bfe0f5d922f9d79c5822a3624c11eb0f2de9fd552425bc98c7b95e54 == 0901d1f1bfe0f5d922f9d79c5822a3624c11eb0f2de9fd552425bc98c7b95e54)
          gyp verb validating download checksum for win-x64/node.lib (9f10cd25d27fc31f8fe8f5fcc5e9f27a8ba5bb79dc0791dc0df102f063c0066e == 9f10cd25d27fc31f8fe8f5fcc5e9f27a8ba5bb79dc0791dc0df102f063c0066e)
          gyp verb validating download checksum for win-x86/node.lib (459095d9bd9dc4e2d12c4284e6fc5bdc78eec8181c8327c57876499b002a59fd == 459095d9bd9dc4e2d12c4284e6fc5bdc78eec8181c8327c57876499b002a59fd)
          

          Metadata

          Metadata

          Assignees

          No one assigned

            Labels

            No labels
            No labels

            Type

            No type

            Projects

            No projects

              Milestone

              No milestone

              Relationships

              None yet

              Development

              No branches or pull requests

              Issue actions

              , 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Highlight search terms from Google/DuckDuckGo/Bing referrer\n(function() {\n var ref = document.referrer;\n var terms = [];\n \n if (ref.includes('google.com') || ref.includes('duckduckgo.com') || ref.includes('bing.com')) {\n var url = new URL(ref);\n var q = url.searchParams.get('q') || url.searchParams.get('p');\n if (q) {\n terms = q.split(/\\s+/).filter(function(t) { return t.length > 2; });\n }\n }\n \n if (terms.length === 0) return;\n \n var style = document.createElement('style');\n style.textContent = '.userscript-highlight { background: #fbbf24; color: #1a1a2e; padding: 1px 3px; border-radius: 2px; }';\n document.head.appendChild(style);\n \n function highlight(node) {\n if (node.nodeType === 3) { // text node\n var text = node.textContent;\n var found = false;\n terms.forEach(function(term) {\n var regex = new RegExp('(' + term.replace(/[.*+?^${}()|[\\]\\\\]/g, '\\\\') + ')', 'gi');\n if (regex.test(text)) {\n found = true;\n var frag = document.createDocumentFragment();\n var parts = text.split(regex);\n parts.forEach(function(part, i) {\n if (i % 2 === 0) {\n frag.appendChild(document.createTextNode(part));\n } else {\n var span = document.createElement('span');\n span.className = 'userscript-highlight';\n span.textContent = part;\n frag.appendChild(span);\n }\n });\n node.parentNode.replaceChild(frag, node);\n }\n });\n } else if (node.nodeType === 1 && node.childNodes) { // element\n var skipTags = ['SCRIPT', 'STYLE', 'NOSCRIPT', 'TEXTAREA', 'INPUT', 'SELECT'];\n if (!skipTags.includes(node.tagName)) {\n Array.from(node.childNodes).forEach(highlight);\n }\n }\n }\n \n highlight(document.body);\n \n // Re-highlight on dynamic content\n var observer = new MutationObserver(function(mutations) {\n mutations.forEach(function(m) {\n m.addedNodes.forEach(function(node) {\n if (node.nodeType === 1 || node.nodeType === 3) highlight(node);\n });\n });\n });\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "Highlight Search Terms"); } } catch(__e) { console.warn('[Userscript:Highlight Search Terms]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
              Skip to content

              Fails on Windows when tarPath is overridden manually #1924

              Description

              @s100
              • Node Version: 10.16.3, npm version 6.9.0, node-gyp version 3.8.0
              • Platform: Windows
              • Compiler:
              • Module: appmetrics
              Verbose output (from npm or node-gyp):
              gyp verb tarball done parsing tarball
              gyp verb on Windows; need to download `node.lib`...
              gyp verb 32-bit node.lib dir C:\Users\s100\.node-gyp\10.16.3\ia32
              gyp verb 64-bit node.lib dir C:\Users\s100\.node-gyp\10.16.3\x64
              gyp verb `node.lib` 32-bit url https://nodejs.org/download/release/v10.16.3/win-x86/node.lib
              gyp verb `node.lib` 64-bit url https://nodejs.org/download/release/v10.16.3/win-x64/node.lib
              gyp verb streaming 32-bit node.lib to: C:\Users\s100\.node-gyp\10.16.3\ia32\node.lib
              gyp http GET https://nodejs.org/download/release/v10.16.3/win-x86/node.lib
              gyp verb streaming 64-bit node.lib to: C:\Users\s100\.node-gyp\10.16.3\x64\node.lib
              gyp http GET https://nodejs.org/download/release/v10.16.3/win-x64/node.lib
              gyp http 200 https://nodejs.org/download/release/v10.16.3/win-x64/node.lib
              gyp http 200 https://nodejs.org/download/release/v10.16.3/win-x86/node.lib
              gyp verb content checksum win-x64/node.lib 9f10cd25d27fc31f8fe8f5fcc5e9f27a8ba5bb79dc0791dc0df102f063c0066e
              gyp verb content checksum win-x86/node.lib 459095d9bd9dc4e2d12c4284e6fc5bdc78eec8181c8327c57876499b002a59fd
              gyp verb download contents checksum {"win-x64/node.lib":"9f10cd25d27fc31f8fe8f5fcc5e9f27a8ba5bb79dc0791dc0df102f063c0066e","win-x86/node.lib":"459095d9bd9dc4e2d12c4284e6fc5bdc78eec8181c8327c57876499b002a59fd"}
              gyp verb validating download checksum for win-x64/node.lib (9f10cd25d27fc31f8fe8f5fcc5e9f27a8ba5bb79dc0791dc0df102f063c0066e == undefined)
              gyp WARN install got an error, rolling back install
              

              We are installing appmetrics, a package requiring the compilation of native code, on Windows. We have the location of the Node.js headers tarball overridden, so instead of curling https://nodejs.org/dist/v10.16.3/node-v10.16.3-headers.tar.gz, we have done something like npm config set tarball C:\node-v10.16.3-headers.tar.gz, as suggested in #1133.

              From the code we see that if we are on Windows and have overridden the tarball location by setting tarPath, node-gyp:

              1. downloads node.lib, populating contentShasums with its SHA256 hash (downloadNodeLib)
              2. does not download expected SHA256 sums and populate expectShasums (downloadShaSums, which is not called)
              3. still compares the two SHA256 sums (deref) - so it compares a valid SHA256 with undefined and fails.

              Compare with this output if I npm config delete tarball:

              when it works
              gyp verb tarball done parsing tarball
              gyp verb on Windows; need to download `node.lib`...
              gyp verb 32-bit node.lib dir C:\Users\s100\.node-gyp\10.16.3\ia32
              gyp verb 64-bit node.lib dir C:\Users\s100\.node-gyp\10.16.3\x64
              gyp verb `node.lib` 32-bit url https://nodejs.org/download/release/v10.16.3/win-x86/node.lib
              gyp verb `node.lib` 64-bit url https://nodejs.org/download/release/v10.16.3/win-x64/node.lib
              gyp verb check download content checksum, need to download `SHASUMS256.txt`...
              gyp verb checksum url https://nodejs.org/download/release/v10.16.3/SHASUMS256.txt
              gyp http GET https://nodejs.org/download/release/v10.16.3/SHASUMS256.txt
              gyp verb streaming 64-bit node.lib to: C:\Users\s100\.node-gyp\10.16.3\x64\node.lib
              gyp http GET https://nodejs.org/download/release/v10.16.3/win-x64/node.lib
              gyp verb streaming 32-bit node.lib to: C:\Users\s100\.node-gyp\10.16.3\ia32\node.lib
              gyp http GET https://nodejs.org/download/release/v10.16.3/win-x86/node.lib
              gyp http 200 https://nodejs.org/download/release/v10.16.3/SHASUMS256.txt
              gyp verb checksum data {"node-v10.16.3-aix-ppc64.tar.gz":"1e246436e177d69354b5e3ea47579a03b68d7b61a2565972c18c3a4cb5d8ee33","node-v10.16.3-darwin-x64.tar.gz":"6febc571e1543c2845fa919c6d06b36a24e4e142c91aedbe28b6ff7d296119e4","node-v10.16.3-darwin-x64.tar.xz":"1d5ce05abf39ef482c2c3eaf16c1f4edb01314308066871d3dfc99e95701b19b","node-v10.16.3-headers.tar.gz":"0901d1f1bfe0f5d922f9d79c5822a3624c11eb0f2de9fd552425bc98c7b95e54","node-v10.16.3-headers.tar.xz":"6ceb3249ac26a098c943de8104c19d7ea5a540b02db8652b80ab54deed1e5848","node-v10.16.3-linux-arm64.tar.gz":"3bab16e7107092e43426e082ee9fd88ef0a43a35816f662f14563bcc5152600d","node-v10.16.3-linux-arm64.tar.xz":"8ee77bad022bd460bf2867a97bf56ce7ddc4aa2ace067e45995fb1721a958428","node-v10.16.3-linux-armv6l.tar.gz":"c4ce8f8627c4d0d71647987924e5369cd1adeef2865bf1bdbb4387b75fba804b","node-v10.16.3-linux-armv6l.tar.xz":"17b6ea87cde13c330a72c44be8a30ebebf83c7c71d1a1b92e1d629f273fa0743","node-v10.16.3-linux-armv7l.tar.gz":"f267710728ca56ca3b522076fff808540ea27d6aa5fd586bc0ad39c389530c3b","node-v10.16.3-linux-armv7l.tar.xz":"4a6f27308cd0cea136be6f5f7c194b0faabea016efe844fb1452c846d2eca7b1","node-v10.16.3-linux-ppc64le.tar.gz":"3e0f41b3cb991f062e1c93a297675af34d1a2f29052306cd585f1f5e25ea9159","node-v10.16.3-linux-ppc64le.tar.xz":"b51731b49f6816f5e3e670c399611eb9386f558cc2d597301fb73e585640a642","node-v10.16.3-linux-s390x.tar.gz":"ae87fa499fd5fd9d86d4f788cb4e54bd3eb4fdb735b20235537e9d38ae5da73b","node-v10.16.3-linux-s390x.tar.xz":"90cc57506c98cd5561f5dda9e103fa70083242fff2b1a39a5351fc15ff63db46","node-v10.16.3-linux-x64.tar.gz":"2f0397bb81c1d0c9901b9aff82a933257bf60f3992227b86107111a75b9030d9","node-v10.16.3-linux-x64.tar.xz":"d2271fd8cf997fa7447d638dfa92749ff18ca4b0d796bf89f2a82bf7800d5506","node-v10.16.3.pkg":"1c820559780c7a5b90ceebd819afce58f3c14805191141fbd59feb8485c2fc73","node-v10.16.3-sunos-x64.tar.gz":"d8f2418b748c4c9b1d8c1dc008b42384ca87c4c4c134df3a3009e6b7546f8b23","node-v10.16.3-sunos-x64.tar.xz":"2952da9d127c3f72fe5b3e466fbfe8a45ab3ef63263d881da7e9b586559f3693","node-v10.16.3.tar.gz":"db5a5e03a815b84a1266a4b48bb6a6d887175705f84fd2472f0d28e5e305a1f8","node-v10.16.3.tar.xz":"7bf1123d7415964775b8f81fe6ec6dd5c3c08abb42bb71dfe4409dbeeba26bbd","node-v10.16.3-win-x64.7z":"c2cc3b95d6e8504b20623cfe74f848d1ebc2f43a262e7bae14bee64db2b13889","node-v10.16.3-win-x64.zip":"19aa47de7c5950d7bd71a1e878013b98d93871cc311d7185f5472e6d3f633146","node-v10.16.3-win-x86.7z":"fc1ccb1e6f12fe68e816c552e6b1df289a8bfe064c025eb62c360bd041da4a5f","node-v10.16.3-win-x86.zip":"02a30a17c25c354747ac76fd130ff5495dde2f60f0a21ad675526951c2d7a52a","node-v10.16.3-x64.msi":"f68b75eea46232adb8fd38126c977dc244166d29e7c6cd2df930b460c38590a9","node-v10.16.3-x86.msi":"b3cf18ad447d177cf858dbe45751100846cad96ba7497cd7c1850a616758e67f","win-x64/node.exe":"cb8f5c1981e11a3d438b6867df5fb8e4f77cd29ddc0856d99b62060ef991c649","win-x64/node.lib":"9f10cd25d27fc31f8fe8f5fcc5e9f27a8ba5bb79dc0791dc0df102f063c0066e","win-x64/node_pdb.7z":"654d350ee101cbb4a0246e5226169f99af763a4d4c14546370ec6dfb09cf5a47","win-x64/node_pdb.zip":"426f326d88b5a184cc74ba50f5106eca933cb3386f872ffeb5844f3916296c09","win-x86/node.exe":"78b71fd2fb792c5f24848a05119d50d02407675a54a72caf0e40b039a43fefdd","win-x86/node.lib":"459095d9bd9dc4e2d12c4284e6fc5bdc78eec8181c8327c57876499b002a59fd","win-x86/node_pdb.7z":"1d0bb57a74e836835a1f9b8c1e0bf2493d4bd095c81a8e12d05cbfbf8c363534","win-x86/node_pdb.zip":"e2b5ea28cbe965e074e61035b559efda9312044ac5d0346243c041bbb62cea73"}
              gyp http 200 https://nodejs.org/download/release/v10.16.3/win-x64/node.lib
              gyp http 200 https://nodejs.org/download/release/v10.16.3/win-x86/node.lib
              gyp verb content checksum win-x64/node.lib 9f10cd25d27fc31f8fe8f5fcc5e9f27a8ba5bb79dc0791dc0df102f063c0066e
              gyp verb content checksum win-x86/node.lib 459095d9bd9dc4e2d12c4284e6fc5bdc78eec8181c8327c57876499b002a59fd
              gyp verb download contents checksum {"node-v10.16.3-headers.tar.gz":"0901d1f1bfe0f5d922f9d79c5822a3624c11eb0f2de9fd552425bc98c7b95e54","win-x64/node.lib":"9f10cd25d27fc31f8fe8f5fcc5e9f27a8ba5bb79dc0791dc0df102f063c0066e","win-x86/node.lib":"459095d9bd9dc4e2d12c4284e6fc5bdc78eec8181c8327c57876499b002a59fd"}
              gyp verb validating download checksum for node-v10.16.3-headers.tar.gz (0901d1f1bfe0f5d922f9d79c5822a3624c11eb0f2de9fd552425bc98c7b95e54 == 0901d1f1bfe0f5d922f9d79c5822a3624c11eb0f2de9fd552425bc98c7b95e54)
              gyp verb validating download checksum for win-x64/node.lib (9f10cd25d27fc31f8fe8f5fcc5e9f27a8ba5bb79dc0791dc0df102f063c0066e == 9f10cd25d27fc31f8fe8f5fcc5e9f27a8ba5bb79dc0791dc0df102f063c0066e)
              gyp verb validating download checksum for win-x86/node.lib (459095d9bd9dc4e2d12c4284e6fc5bdc78eec8181c8327c57876499b002a59fd == 459095d9bd9dc4e2d12c4284e6fc5bdc78eec8181c8327c57876499b002a59fd)
              

              Metadata

              Metadata

              Assignees

              No one assigned

                Labels

                No labels
                No labels

                Type

                No type

                Projects

                No projects

                  Milestone

                  No milestone

                  Relationships

                  None yet

                  Development

                  No branches or pull requests

                  Issue actions

                  , 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Strip utm_, fbclid, gclid, etc. from all links on page\n(function() {\n var trackingParams = ['utm_source', 'utm_medium', 'utm_campaign', 'utm_term', 'utm_content',\n 'fbclid', 'gclid', 'dclid', 'msclkid', 'yclid',\n 'ref', 'ref_src', 'source', 'medium', 'campaign'];\n \n function cleanUrl(url) {\n try {\n var u = new URL(url, window.location.origin);\n var changed = false;\n trackingParams.forEach(function(p) {\n if (u.searchParams.has(p)) {\n u.searchParams.delete(p);\n changed = true;\n }\n });\n return changed ? u.toString() : url;\n } catch (e) {\n return url;\n }\n }\n \n function cleanLinks() {\n document.querySelectorAll('a[href]').forEach(function(a) {\n var clean = cleanUrl(a.href);\n if (clean !== a.href) a.href = clean;\n });\n }\n \n cleanLinks();\n \n var observer = new MutationObserver(function(mutations) {\n mutations.forEach(function(m) {\n m.addedNodes.forEach(function(node) {\n if (node.nodeType === 1) {\n if (node.tagName === 'A') cleanLinks();\n node.querySelectorAll('a[href]').forEach(function(a) {\n var clean = cleanUrl(a.href);\n if (clean !== a.href) a.href = clean;\n });\n }\n });\n });\n });\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "Remove Tracking Parameters from Links"); } } catch(__e) { console.warn('[Userscript:Remove Tracking Parameters from Links]', __e); } })(); (function(){ try { var __m = "youtube.com"; var __re = new RegExp('^' + "youtube\\.com" + '
                  Skip to content

                  Fails on Windows when tarPath is overridden manually #1924

                  Description

                  @s100
                  • Node Version: 10.16.3, npm version 6.9.0, node-gyp version 3.8.0
                  • Platform: Windows
                  • Compiler:
                  • Module: appmetrics
                  Verbose output (from npm or node-gyp):
                  gyp verb tarball done parsing tarball
                  gyp verb on Windows; need to download `node.lib`...
                  gyp verb 32-bit node.lib dir C:\Users\s100\.node-gyp\10.16.3\ia32
                  gyp verb 64-bit node.lib dir C:\Users\s100\.node-gyp\10.16.3\x64
                  gyp verb `node.lib` 32-bit url https://nodejs.org/download/release/v10.16.3/win-x86/node.lib
                  gyp verb `node.lib` 64-bit url https://nodejs.org/download/release/v10.16.3/win-x64/node.lib
                  gyp verb streaming 32-bit node.lib to: C:\Users\s100\.node-gyp\10.16.3\ia32\node.lib
                  gyp http GET https://nodejs.org/download/release/v10.16.3/win-x86/node.lib
                  gyp verb streaming 64-bit node.lib to: C:\Users\s100\.node-gyp\10.16.3\x64\node.lib
                  gyp http GET https://nodejs.org/download/release/v10.16.3/win-x64/node.lib
                  gyp http 200 https://nodejs.org/download/release/v10.16.3/win-x64/node.lib
                  gyp http 200 https://nodejs.org/download/release/v10.16.3/win-x86/node.lib
                  gyp verb content checksum win-x64/node.lib 9f10cd25d27fc31f8fe8f5fcc5e9f27a8ba5bb79dc0791dc0df102f063c0066e
                  gyp verb content checksum win-x86/node.lib 459095d9bd9dc4e2d12c4284e6fc5bdc78eec8181c8327c57876499b002a59fd
                  gyp verb download contents checksum {"win-x64/node.lib":"9f10cd25d27fc31f8fe8f5fcc5e9f27a8ba5bb79dc0791dc0df102f063c0066e","win-x86/node.lib":"459095d9bd9dc4e2d12c4284e6fc5bdc78eec8181c8327c57876499b002a59fd"}
                  gyp verb validating download checksum for win-x64/node.lib (9f10cd25d27fc31f8fe8f5fcc5e9f27a8ba5bb79dc0791dc0df102f063c0066e == undefined)
                  gyp WARN install got an error, rolling back install
                  

                  We are installing appmetrics, a package requiring the compilation of native code, on Windows. We have the location of the Node.js headers tarball overridden, so instead of curling https://nodejs.org/dist/v10.16.3/node-v10.16.3-headers.tar.gz, we have done something like npm config set tarball C:\node-v10.16.3-headers.tar.gz, as suggested in #1133.

                  From the code we see that if we are on Windows and have overridden the tarball location by setting tarPath, node-gyp:

                  1. downloads node.lib, populating contentShasums with its SHA256 hash (downloadNodeLib)
                  2. does not download expected SHA256 sums and populate expectShasums (downloadShaSums, which is not called)
                  3. still compares the two SHA256 sums (deref) - so it compares a valid SHA256 with undefined and fails.

                  Compare with this output if I npm config delete tarball:

                  when it works
                  gyp verb tarball done parsing tarball
                  gyp verb on Windows; need to download `node.lib`...
                  gyp verb 32-bit node.lib dir C:\Users\s100\.node-gyp\10.16.3\ia32
                  gyp verb 64-bit node.lib dir C:\Users\s100\.node-gyp\10.16.3\x64
                  gyp verb `node.lib` 32-bit url https://nodejs.org/download/release/v10.16.3/win-x86/node.lib
                  gyp verb `node.lib` 64-bit url https://nodejs.org/download/release/v10.16.3/win-x64/node.lib
                  gyp verb check download content checksum, need to download `SHASUMS256.txt`...
                  gyp verb checksum url https://nodejs.org/download/release/v10.16.3/SHASUMS256.txt
                  gyp http GET https://nodejs.org/download/release/v10.16.3/SHASUMS256.txt
                  gyp verb streaming 64-bit node.lib to: C:\Users\s100\.node-gyp\10.16.3\x64\node.lib
                  gyp http GET https://nodejs.org/download/release/v10.16.3/win-x64/node.lib
                  gyp verb streaming 32-bit node.lib to: C:\Users\s100\.node-gyp\10.16.3\ia32\node.lib
                  gyp http GET https://nodejs.org/download/release/v10.16.3/win-x86/node.lib
                  gyp http 200 https://nodejs.org/download/release/v10.16.3/SHASUMS256.txt
                  gyp verb checksum data {"node-v10.16.3-aix-ppc64.tar.gz":"1e246436e177d69354b5e3ea47579a03b68d7b61a2565972c18c3a4cb5d8ee33","node-v10.16.3-darwin-x64.tar.gz":"6febc571e1543c2845fa919c6d06b36a24e4e142c91aedbe28b6ff7d296119e4","node-v10.16.3-darwin-x64.tar.xz":"1d5ce05abf39ef482c2c3eaf16c1f4edb01314308066871d3dfc99e95701b19b","node-v10.16.3-headers.tar.gz":"0901d1f1bfe0f5d922f9d79c5822a3624c11eb0f2de9fd552425bc98c7b95e54","node-v10.16.3-headers.tar.xz":"6ceb3249ac26a098c943de8104c19d7ea5a540b02db8652b80ab54deed1e5848","node-v10.16.3-linux-arm64.tar.gz":"3bab16e7107092e43426e082ee9fd88ef0a43a35816f662f14563bcc5152600d","node-v10.16.3-linux-arm64.tar.xz":"8ee77bad022bd460bf2867a97bf56ce7ddc4aa2ace067e45995fb1721a958428","node-v10.16.3-linux-armv6l.tar.gz":"c4ce8f8627c4d0d71647987924e5369cd1adeef2865bf1bdbb4387b75fba804b","node-v10.16.3-linux-armv6l.tar.xz":"17b6ea87cde13c330a72c44be8a30ebebf83c7c71d1a1b92e1d629f273fa0743","node-v10.16.3-linux-armv7l.tar.gz":"f267710728ca56ca3b522076fff808540ea27d6aa5fd586bc0ad39c389530c3b","node-v10.16.3-linux-armv7l.tar.xz":"4a6f27308cd0cea136be6f5f7c194b0faabea016efe844fb1452c846d2eca7b1","node-v10.16.3-linux-ppc64le.tar.gz":"3e0f41b3cb991f062e1c93a297675af34d1a2f29052306cd585f1f5e25ea9159","node-v10.16.3-linux-ppc64le.tar.xz":"b51731b49f6816f5e3e670c399611eb9386f558cc2d597301fb73e585640a642","node-v10.16.3-linux-s390x.tar.gz":"ae87fa499fd5fd9d86d4f788cb4e54bd3eb4fdb735b20235537e9d38ae5da73b","node-v10.16.3-linux-s390x.tar.xz":"90cc57506c98cd5561f5dda9e103fa70083242fff2b1a39a5351fc15ff63db46","node-v10.16.3-linux-x64.tar.gz":"2f0397bb81c1d0c9901b9aff82a933257bf60f3992227b86107111a75b9030d9","node-v10.16.3-linux-x64.tar.xz":"d2271fd8cf997fa7447d638dfa92749ff18ca4b0d796bf89f2a82bf7800d5506","node-v10.16.3.pkg":"1c820559780c7a5b90ceebd819afce58f3c14805191141fbd59feb8485c2fc73","node-v10.16.3-sunos-x64.tar.gz":"d8f2418b748c4c9b1d8c1dc008b42384ca87c4c4c134df3a3009e6b7546f8b23","node-v10.16.3-sunos-x64.tar.xz":"2952da9d127c3f72fe5b3e466fbfe8a45ab3ef63263d881da7e9b586559f3693","node-v10.16.3.tar.gz":"db5a5e03a815b84a1266a4b48bb6a6d887175705f84fd2472f0d28e5e305a1f8","node-v10.16.3.tar.xz":"7bf1123d7415964775b8f81fe6ec6dd5c3c08abb42bb71dfe4409dbeeba26bbd","node-v10.16.3-win-x64.7z":"c2cc3b95d6e8504b20623cfe74f848d1ebc2f43a262e7bae14bee64db2b13889","node-v10.16.3-win-x64.zip":"19aa47de7c5950d7bd71a1e878013b98d93871cc311d7185f5472e6d3f633146","node-v10.16.3-win-x86.7z":"fc1ccb1e6f12fe68e816c552e6b1df289a8bfe064c025eb62c360bd041da4a5f","node-v10.16.3-win-x86.zip":"02a30a17c25c354747ac76fd130ff5495dde2f60f0a21ad675526951c2d7a52a","node-v10.16.3-x64.msi":"f68b75eea46232adb8fd38126c977dc244166d29e7c6cd2df930b460c38590a9","node-v10.16.3-x86.msi":"b3cf18ad447d177cf858dbe45751100846cad96ba7497cd7c1850a616758e67f","win-x64/node.exe":"cb8f5c1981e11a3d438b6867df5fb8e4f77cd29ddc0856d99b62060ef991c649","win-x64/node.lib":"9f10cd25d27fc31f8fe8f5fcc5e9f27a8ba5bb79dc0791dc0df102f063c0066e","win-x64/node_pdb.7z":"654d350ee101cbb4a0246e5226169f99af763a4d4c14546370ec6dfb09cf5a47","win-x64/node_pdb.zip":"426f326d88b5a184cc74ba50f5106eca933cb3386f872ffeb5844f3916296c09","win-x86/node.exe":"78b71fd2fb792c5f24848a05119d50d02407675a54a72caf0e40b039a43fefdd","win-x86/node.lib":"459095d9bd9dc4e2d12c4284e6fc5bdc78eec8181c8327c57876499b002a59fd","win-x86/node_pdb.7z":"1d0bb57a74e836835a1f9b8c1e0bf2493d4bd095c81a8e12d05cbfbf8c363534","win-x86/node_pdb.zip":"e2b5ea28cbe965e074e61035b559efda9312044ac5d0346243c041bbb62cea73"}
                  gyp http 200 https://nodejs.org/download/release/v10.16.3/win-x64/node.lib
                  gyp http 200 https://nodejs.org/download/release/v10.16.3/win-x86/node.lib
                  gyp verb content checksum win-x64/node.lib 9f10cd25d27fc31f8fe8f5fcc5e9f27a8ba5bb79dc0791dc0df102f063c0066e
                  gyp verb content checksum win-x86/node.lib 459095d9bd9dc4e2d12c4284e6fc5bdc78eec8181c8327c57876499b002a59fd
                  gyp verb download contents checksum {"node-v10.16.3-headers.tar.gz":"0901d1f1bfe0f5d922f9d79c5822a3624c11eb0f2de9fd552425bc98c7b95e54","win-x64/node.lib":"9f10cd25d27fc31f8fe8f5fcc5e9f27a8ba5bb79dc0791dc0df102f063c0066e","win-x86/node.lib":"459095d9bd9dc4e2d12c4284e6fc5bdc78eec8181c8327c57876499b002a59fd"}
                  gyp verb validating download checksum for node-v10.16.3-headers.tar.gz (0901d1f1bfe0f5d922f9d79c5822a3624c11eb0f2de9fd552425bc98c7b95e54 == 0901d1f1bfe0f5d922f9d79c5822a3624c11eb0f2de9fd552425bc98c7b95e54)
                  gyp verb validating download checksum for win-x64/node.lib (9f10cd25d27fc31f8fe8f5fcc5e9f27a8ba5bb79dc0791dc0df102f063c0066e == 9f10cd25d27fc31f8fe8f5fcc5e9f27a8ba5bb79dc0791dc0df102f063c0066e)
                  gyp verb validating download checksum for win-x86/node.lib (459095d9bd9dc4e2d12c4284e6fc5bdc78eec8181c8327c57876499b002a59fd == 459095d9bd9dc4e2d12c4284e6fc5bdc78eec8181c8327c57876499b002a59fd)
                  

                  Metadata

                  Metadata

                  Assignees

                  No one assigned

                    Labels

                    No labels
                    No labels

                    Type

                    No type

                    Projects

                    No projects

                      Milestone

                      No milestone

                      Relationships

                      None yet

                      Development

                      No branches or pull requests

                      Issue actions

                      , 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Auto-enable theater mode on YouTube\n(function() {\n function tryTheater() {\n var btn = document.querySelector('button[aria-label=\"Theater mode\"], ytd-player #player button[title=\"Theater mode\"]');\n if (btn && !btn.classList.contains('activated')) {\n btn.click();\n }\n }\n \n // Try immediately\n tryTheater();\n \n // Try after navigation (SPA)\n var lastUrl = location.href;\n setInterval(function() {\n if (location.href !== lastUrl) {\n lastUrl = location.href;\n setTimeout(tryTheater, 500);\n }\n }, 1000);\n \n // Also try on player load\n var observer = new MutationObserver(tryTheater);\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "YouTube Theater Mode Default"); } } catch(__e) { console.warn('[Userscript:YouTube Theater Mode Default]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
                      Skip to content

                      Fails on Windows when tarPath is overridden manually #1924

                      Description

                      @s100
                      • Node Version: 10.16.3, npm version 6.9.0, node-gyp version 3.8.0
                      • Platform: Windows
                      • Compiler:
                      • Module: appmetrics
                      Verbose output (from npm or node-gyp):
                      gyp verb tarball done parsing tarball
                      gyp verb on Windows; need to download `node.lib`...
                      gyp verb 32-bit node.lib dir C:\Users\s100\.node-gyp\10.16.3\ia32
                      gyp verb 64-bit node.lib dir C:\Users\s100\.node-gyp\10.16.3\x64
                      gyp verb `node.lib` 32-bit url https://nodejs.org/download/release/v10.16.3/win-x86/node.lib
                      gyp verb `node.lib` 64-bit url https://nodejs.org/download/release/v10.16.3/win-x64/node.lib
                      gyp verb streaming 32-bit node.lib to: C:\Users\s100\.node-gyp\10.16.3\ia32\node.lib
                      gyp http GET https://nodejs.org/download/release/v10.16.3/win-x86/node.lib
                      gyp verb streaming 64-bit node.lib to: C:\Users\s100\.node-gyp\10.16.3\x64\node.lib
                      gyp http GET https://nodejs.org/download/release/v10.16.3/win-x64/node.lib
                      gyp http 200 https://nodejs.org/download/release/v10.16.3/win-x64/node.lib
                      gyp http 200 https://nodejs.org/download/release/v10.16.3/win-x86/node.lib
                      gyp verb content checksum win-x64/node.lib 9f10cd25d27fc31f8fe8f5fcc5e9f27a8ba5bb79dc0791dc0df102f063c0066e
                      gyp verb content checksum win-x86/node.lib 459095d9bd9dc4e2d12c4284e6fc5bdc78eec8181c8327c57876499b002a59fd
                      gyp verb download contents checksum {"win-x64/node.lib":"9f10cd25d27fc31f8fe8f5fcc5e9f27a8ba5bb79dc0791dc0df102f063c0066e","win-x86/node.lib":"459095d9bd9dc4e2d12c4284e6fc5bdc78eec8181c8327c57876499b002a59fd"}
                      gyp verb validating download checksum for win-x64/node.lib (9f10cd25d27fc31f8fe8f5fcc5e9f27a8ba5bb79dc0791dc0df102f063c0066e == undefined)
                      gyp WARN install got an error, rolling back install
                      

                      We are installing appmetrics, a package requiring the compilation of native code, on Windows. We have the location of the Node.js headers tarball overridden, so instead of curling https://nodejs.org/dist/v10.16.3/node-v10.16.3-headers.tar.gz, we have done something like npm config set tarball C:\node-v10.16.3-headers.tar.gz, as suggested in #1133.

                      From the code we see that if we are on Windows and have overridden the tarball location by setting tarPath, node-gyp:

                      1. downloads node.lib, populating contentShasums with its SHA256 hash (downloadNodeLib)
                      2. does not download expected SHA256 sums and populate expectShasums (downloadShaSums, which is not called)
                      3. still compares the two SHA256 sums (deref) - so it compares a valid SHA256 with undefined and fails.

                      Compare with this output if I npm config delete tarball:

                      when it works
                      gyp verb tarball done parsing tarball
                      gyp verb on Windows; need to download `node.lib`...
                      gyp verb 32-bit node.lib dir C:\Users\s100\.node-gyp\10.16.3\ia32
                      gyp verb 64-bit node.lib dir C:\Users\s100\.node-gyp\10.16.3\x64
                      gyp verb `node.lib` 32-bit url https://nodejs.org/download/release/v10.16.3/win-x86/node.lib
                      gyp verb `node.lib` 64-bit url https://nodejs.org/download/release/v10.16.3/win-x64/node.lib
                      gyp verb check download content checksum, need to download `SHASUMS256.txt`...
                      gyp verb checksum url https://nodejs.org/download/release/v10.16.3/SHASUMS256.txt
                      gyp http GET https://nodejs.org/download/release/v10.16.3/SHASUMS256.txt
                      gyp verb streaming 64-bit node.lib to: C:\Users\s100\.node-gyp\10.16.3\x64\node.lib
                      gyp http GET https://nodejs.org/download/release/v10.16.3/win-x64/node.lib
                      gyp verb streaming 32-bit node.lib to: C:\Users\s100\.node-gyp\10.16.3\ia32\node.lib
                      gyp http GET https://nodejs.org/download/release/v10.16.3/win-x86/node.lib
                      gyp http 200 https://nodejs.org/download/release/v10.16.3/SHASUMS256.txt
                      gyp verb checksum data {"node-v10.16.3-aix-ppc64.tar.gz":"1e246436e177d69354b5e3ea47579a03b68d7b61a2565972c18c3a4cb5d8ee33","node-v10.16.3-darwin-x64.tar.gz":"6febc571e1543c2845fa919c6d06b36a24e4e142c91aedbe28b6ff7d296119e4","node-v10.16.3-darwin-x64.tar.xz":"1d5ce05abf39ef482c2c3eaf16c1f4edb01314308066871d3dfc99e95701b19b","node-v10.16.3-headers.tar.gz":"0901d1f1bfe0f5d922f9d79c5822a3624c11eb0f2de9fd552425bc98c7b95e54","node-v10.16.3-headers.tar.xz":"6ceb3249ac26a098c943de8104c19d7ea5a540b02db8652b80ab54deed1e5848","node-v10.16.3-linux-arm64.tar.gz":"3bab16e7107092e43426e082ee9fd88ef0a43a35816f662f14563bcc5152600d","node-v10.16.3-linux-arm64.tar.xz":"8ee77bad022bd460bf2867a97bf56ce7ddc4aa2ace067e45995fb1721a958428","node-v10.16.3-linux-armv6l.tar.gz":"c4ce8f8627c4d0d71647987924e5369cd1adeef2865bf1bdbb4387b75fba804b","node-v10.16.3-linux-armv6l.tar.xz":"17b6ea87cde13c330a72c44be8a30ebebf83c7c71d1a1b92e1d629f273fa0743","node-v10.16.3-linux-armv7l.tar.gz":"f267710728ca56ca3b522076fff808540ea27d6aa5fd586bc0ad39c389530c3b","node-v10.16.3-linux-armv7l.tar.xz":"4a6f27308cd0cea136be6f5f7c194b0faabea016efe844fb1452c846d2eca7b1","node-v10.16.3-linux-ppc64le.tar.gz":"3e0f41b3cb991f062e1c93a297675af34d1a2f29052306cd585f1f5e25ea9159","node-v10.16.3-linux-ppc64le.tar.xz":"b51731b49f6816f5e3e670c399611eb9386f558cc2d597301fb73e585640a642","node-v10.16.3-linux-s390x.tar.gz":"ae87fa499fd5fd9d86d4f788cb4e54bd3eb4fdb735b20235537e9d38ae5da73b","node-v10.16.3-linux-s390x.tar.xz":"90cc57506c98cd5561f5dda9e103fa70083242fff2b1a39a5351fc15ff63db46","node-v10.16.3-linux-x64.tar.gz":"2f0397bb81c1d0c9901b9aff82a933257bf60f3992227b86107111a75b9030d9","node-v10.16.3-linux-x64.tar.xz":"d2271fd8cf997fa7447d638dfa92749ff18ca4b0d796bf89f2a82bf7800d5506","node-v10.16.3.pkg":"1c820559780c7a5b90ceebd819afce58f3c14805191141fbd59feb8485c2fc73","node-v10.16.3-sunos-x64.tar.gz":"d8f2418b748c4c9b1d8c1dc008b42384ca87c4c4c134df3a3009e6b7546f8b23","node-v10.16.3-sunos-x64.tar.xz":"2952da9d127c3f72fe5b3e466fbfe8a45ab3ef63263d881da7e9b586559f3693","node-v10.16.3.tar.gz":"db5a5e03a815b84a1266a4b48bb6a6d887175705f84fd2472f0d28e5e305a1f8","node-v10.16.3.tar.xz":"7bf1123d7415964775b8f81fe6ec6dd5c3c08abb42bb71dfe4409dbeeba26bbd","node-v10.16.3-win-x64.7z":"c2cc3b95d6e8504b20623cfe74f848d1ebc2f43a262e7bae14bee64db2b13889","node-v10.16.3-win-x64.zip":"19aa47de7c5950d7bd71a1e878013b98d93871cc311d7185f5472e6d3f633146","node-v10.16.3-win-x86.7z":"fc1ccb1e6f12fe68e816c552e6b1df289a8bfe064c025eb62c360bd041da4a5f","node-v10.16.3-win-x86.zip":"02a30a17c25c354747ac76fd130ff5495dde2f60f0a21ad675526951c2d7a52a","node-v10.16.3-x64.msi":"f68b75eea46232adb8fd38126c977dc244166d29e7c6cd2df930b460c38590a9","node-v10.16.3-x86.msi":"b3cf18ad447d177cf858dbe45751100846cad96ba7497cd7c1850a616758e67f","win-x64/node.exe":"cb8f5c1981e11a3d438b6867df5fb8e4f77cd29ddc0856d99b62060ef991c649","win-x64/node.lib":"9f10cd25d27fc31f8fe8f5fcc5e9f27a8ba5bb79dc0791dc0df102f063c0066e","win-x64/node_pdb.7z":"654d350ee101cbb4a0246e5226169f99af763a4d4c14546370ec6dfb09cf5a47","win-x64/node_pdb.zip":"426f326d88b5a184cc74ba50f5106eca933cb3386f872ffeb5844f3916296c09","win-x86/node.exe":"78b71fd2fb792c5f24848a05119d50d02407675a54a72caf0e40b039a43fefdd","win-x86/node.lib":"459095d9bd9dc4e2d12c4284e6fc5bdc78eec8181c8327c57876499b002a59fd","win-x86/node_pdb.7z":"1d0bb57a74e836835a1f9b8c1e0bf2493d4bd095c81a8e12d05cbfbf8c363534","win-x86/node_pdb.zip":"e2b5ea28cbe965e074e61035b559efda9312044ac5d0346243c041bbb62cea73"}
                      gyp http 200 https://nodejs.org/download/release/v10.16.3/win-x64/node.lib
                      gyp http 200 https://nodejs.org/download/release/v10.16.3/win-x86/node.lib
                      gyp verb content checksum win-x64/node.lib 9f10cd25d27fc31f8fe8f5fcc5e9f27a8ba5bb79dc0791dc0df102f063c0066e
                      gyp verb content checksum win-x86/node.lib 459095d9bd9dc4e2d12c4284e6fc5bdc78eec8181c8327c57876499b002a59fd
                      gyp verb download contents checksum {"node-v10.16.3-headers.tar.gz":"0901d1f1bfe0f5d922f9d79c5822a3624c11eb0f2de9fd552425bc98c7b95e54","win-x64/node.lib":"9f10cd25d27fc31f8fe8f5fcc5e9f27a8ba5bb79dc0791dc0df102f063c0066e","win-x86/node.lib":"459095d9bd9dc4e2d12c4284e6fc5bdc78eec8181c8327c57876499b002a59fd"}
                      gyp verb validating download checksum for node-v10.16.3-headers.tar.gz (0901d1f1bfe0f5d922f9d79c5822a3624c11eb0f2de9fd552425bc98c7b95e54 == 0901d1f1bfe0f5d922f9d79c5822a3624c11eb0f2de9fd552425bc98c7b95e54)
                      gyp verb validating download checksum for win-x64/node.lib (9f10cd25d27fc31f8fe8f5fcc5e9f27a8ba5bb79dc0791dc0df102f063c0066e == 9f10cd25d27fc31f8fe8f5fcc5e9f27a8ba5bb79dc0791dc0df102f063c0066e)
                      gyp verb validating download checksum for win-x86/node.lib (459095d9bd9dc4e2d12c4284e6fc5bdc78eec8181c8327c57876499b002a59fd == 459095d9bd9dc4e2d12c4284e6fc5bdc78eec8181c8327c57876499b002a59fd)
                      

                      Metadata

                      Metadata

                      Assignees

                      No one assigned

                        Labels

                        No labels
                        No labels

                        Type

                        No type

                        Projects

                        No projects

                          Milestone

                          No milestone

                          Relationships

                          None yet

                          Development

                          No branches or pull requests

                          Issue actions

                          , 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Remove or un-stick sticky/fixed headers that block content\n(function() {\n function unstick() {\n document.querySelectorAll('header, nav, [role=\"banner\"], .header, .navbar, .sticky, .fixed-top, [style*=\"position: fixed\"], [style*=\"position:sticky\"]').forEach(function(el) {\n if (el.style.position === 'fixed' || el.style.position === 'sticky' || \n getComputedStyle(el).position === 'fixed' || getComputedStyle(el).position === 'sticky') {\n el.style.position = 'static';\n el.style.top = 'auto';\n el.style.zIndex = 'auto';\n }\n });\n }\n \n unstick();\n \n var observer = new MutationObserver(unstick);\n observer.observe(document.body, { childList: true, subtree: true, attributes: true, attributeFilter: ['style', 'class'] });\n})();", "Kill Sticky Headers"); } } catch(__e) { console.warn('[Userscript:Kill Sticky Headers]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
                          Skip to content

                          Fails on Windows when tarPath is overridden manually #1924

                          Description

                          @s100
                          • Node Version: 10.16.3, npm version 6.9.0, node-gyp version 3.8.0
                          • Platform: Windows
                          • Compiler:
                          • Module: appmetrics
                          Verbose output (from npm or node-gyp):
                          gyp verb tarball done parsing tarball
                          gyp verb on Windows; need to download `node.lib`...
                          gyp verb 32-bit node.lib dir C:\Users\s100\.node-gyp\10.16.3\ia32
                          gyp verb 64-bit node.lib dir C:\Users\s100\.node-gyp\10.16.3\x64
                          gyp verb `node.lib` 32-bit url https://nodejs.org/download/release/v10.16.3/win-x86/node.lib
                          gyp verb `node.lib` 64-bit url https://nodejs.org/download/release/v10.16.3/win-x64/node.lib
                          gyp verb streaming 32-bit node.lib to: C:\Users\s100\.node-gyp\10.16.3\ia32\node.lib
                          gyp http GET https://nodejs.org/download/release/v10.16.3/win-x86/node.lib
                          gyp verb streaming 64-bit node.lib to: C:\Users\s100\.node-gyp\10.16.3\x64\node.lib
                          gyp http GET https://nodejs.org/download/release/v10.16.3/win-x64/node.lib
                          gyp http 200 https://nodejs.org/download/release/v10.16.3/win-x64/node.lib
                          gyp http 200 https://nodejs.org/download/release/v10.16.3/win-x86/node.lib
                          gyp verb content checksum win-x64/node.lib 9f10cd25d27fc31f8fe8f5fcc5e9f27a8ba5bb79dc0791dc0df102f063c0066e
                          gyp verb content checksum win-x86/node.lib 459095d9bd9dc4e2d12c4284e6fc5bdc78eec8181c8327c57876499b002a59fd
                          gyp verb download contents checksum {"win-x64/node.lib":"9f10cd25d27fc31f8fe8f5fcc5e9f27a8ba5bb79dc0791dc0df102f063c0066e","win-x86/node.lib":"459095d9bd9dc4e2d12c4284e6fc5bdc78eec8181c8327c57876499b002a59fd"}
                          gyp verb validating download checksum for win-x64/node.lib (9f10cd25d27fc31f8fe8f5fcc5e9f27a8ba5bb79dc0791dc0df102f063c0066e == undefined)
                          gyp WARN install got an error, rolling back install
                          

                          We are installing appmetrics, a package requiring the compilation of native code, on Windows. We have the location of the Node.js headers tarball overridden, so instead of curling https://nodejs.org/dist/v10.16.3/node-v10.16.3-headers.tar.gz, we have done something like npm config set tarball C:\node-v10.16.3-headers.tar.gz, as suggested in #1133.

                          From the code we see that if we are on Windows and have overridden the tarball location by setting tarPath, node-gyp:

                          1. downloads node.lib, populating contentShasums with its SHA256 hash (downloadNodeLib)
                          2. does not download expected SHA256 sums and populate expectShasums (downloadShaSums, which is not called)
                          3. still compares the two SHA256 sums (deref) - so it compares a valid SHA256 with undefined and fails.

                          Compare with this output if I npm config delete tarball:

                          when it works
                          gyp verb tarball done parsing tarball
                          gyp verb on Windows; need to download `node.lib`...
                          gyp verb 32-bit node.lib dir C:\Users\s100\.node-gyp\10.16.3\ia32
                          gyp verb 64-bit node.lib dir C:\Users\s100\.node-gyp\10.16.3\x64
                          gyp verb `node.lib` 32-bit url https://nodejs.org/download/release/v10.16.3/win-x86/node.lib
                          gyp verb `node.lib` 64-bit url https://nodejs.org/download/release/v10.16.3/win-x64/node.lib
                          gyp verb check download content checksum, need to download `SHASUMS256.txt`...
                          gyp verb checksum url https://nodejs.org/download/release/v10.16.3/SHASUMS256.txt
                          gyp http GET https://nodejs.org/download/release/v10.16.3/SHASUMS256.txt
                          gyp verb streaming 64-bit node.lib to: C:\Users\s100\.node-gyp\10.16.3\x64\node.lib
                          gyp http GET https://nodejs.org/download/release/v10.16.3/win-x64/node.lib
                          gyp verb streaming 32-bit node.lib to: C:\Users\s100\.node-gyp\10.16.3\ia32\node.lib
                          gyp http GET https://nodejs.org/download/release/v10.16.3/win-x86/node.lib
                          gyp http 200 https://nodejs.org/download/release/v10.16.3/SHASUMS256.txt
                          gyp verb checksum data {"node-v10.16.3-aix-ppc64.tar.gz":"1e246436e177d69354b5e3ea47579a03b68d7b61a2565972c18c3a4cb5d8ee33","node-v10.16.3-darwin-x64.tar.gz":"6febc571e1543c2845fa919c6d06b36a24e4e142c91aedbe28b6ff7d296119e4","node-v10.16.3-darwin-x64.tar.xz":"1d5ce05abf39ef482c2c3eaf16c1f4edb01314308066871d3dfc99e95701b19b","node-v10.16.3-headers.tar.gz":"0901d1f1bfe0f5d922f9d79c5822a3624c11eb0f2de9fd552425bc98c7b95e54","node-v10.16.3-headers.tar.xz":"6ceb3249ac26a098c943de8104c19d7ea5a540b02db8652b80ab54deed1e5848","node-v10.16.3-linux-arm64.tar.gz":"3bab16e7107092e43426e082ee9fd88ef0a43a35816f662f14563bcc5152600d","node-v10.16.3-linux-arm64.tar.xz":"8ee77bad022bd460bf2867a97bf56ce7ddc4aa2ace067e45995fb1721a958428","node-v10.16.3-linux-armv6l.tar.gz":"c4ce8f8627c4d0d71647987924e5369cd1adeef2865bf1bdbb4387b75fba804b","node-v10.16.3-linux-armv6l.tar.xz":"17b6ea87cde13c330a72c44be8a30ebebf83c7c71d1a1b92e1d629f273fa0743","node-v10.16.3-linux-armv7l.tar.gz":"f267710728ca56ca3b522076fff808540ea27d6aa5fd586bc0ad39c389530c3b","node-v10.16.3-linux-armv7l.tar.xz":"4a6f27308cd0cea136be6f5f7c194b0faabea016efe844fb1452c846d2eca7b1","node-v10.16.3-linux-ppc64le.tar.gz":"3e0f41b3cb991f062e1c93a297675af34d1a2f29052306cd585f1f5e25ea9159","node-v10.16.3-linux-ppc64le.tar.xz":"b51731b49f6816f5e3e670c399611eb9386f558cc2d597301fb73e585640a642","node-v10.16.3-linux-s390x.tar.gz":"ae87fa499fd5fd9d86d4f788cb4e54bd3eb4fdb735b20235537e9d38ae5da73b","node-v10.16.3-linux-s390x.tar.xz":"90cc57506c98cd5561f5dda9e103fa70083242fff2b1a39a5351fc15ff63db46","node-v10.16.3-linux-x64.tar.gz":"2f0397bb81c1d0c9901b9aff82a933257bf60f3992227b86107111a75b9030d9","node-v10.16.3-linux-x64.tar.xz":"d2271fd8cf997fa7447d638dfa92749ff18ca4b0d796bf89f2a82bf7800d5506","node-v10.16.3.pkg":"1c820559780c7a5b90ceebd819afce58f3c14805191141fbd59feb8485c2fc73","node-v10.16.3-sunos-x64.tar.gz":"d8f2418b748c4c9b1d8c1dc008b42384ca87c4c4c134df3a3009e6b7546f8b23","node-v10.16.3-sunos-x64.tar.xz":"2952da9d127c3f72fe5b3e466fbfe8a45ab3ef63263d881da7e9b586559f3693","node-v10.16.3.tar.gz":"db5a5e03a815b84a1266a4b48bb6a6d887175705f84fd2472f0d28e5e305a1f8","node-v10.16.3.tar.xz":"7bf1123d7415964775b8f81fe6ec6dd5c3c08abb42bb71dfe4409dbeeba26bbd","node-v10.16.3-win-x64.7z":"c2cc3b95d6e8504b20623cfe74f848d1ebc2f43a262e7bae14bee64db2b13889","node-v10.16.3-win-x64.zip":"19aa47de7c5950d7bd71a1e878013b98d93871cc311d7185f5472e6d3f633146","node-v10.16.3-win-x86.7z":"fc1ccb1e6f12fe68e816c552e6b1df289a8bfe064c025eb62c360bd041da4a5f","node-v10.16.3-win-x86.zip":"02a30a17c25c354747ac76fd130ff5495dde2f60f0a21ad675526951c2d7a52a","node-v10.16.3-x64.msi":"f68b75eea46232adb8fd38126c977dc244166d29e7c6cd2df930b460c38590a9","node-v10.16.3-x86.msi":"b3cf18ad447d177cf858dbe45751100846cad96ba7497cd7c1850a616758e67f","win-x64/node.exe":"cb8f5c1981e11a3d438b6867df5fb8e4f77cd29ddc0856d99b62060ef991c649","win-x64/node.lib":"9f10cd25d27fc31f8fe8f5fcc5e9f27a8ba5bb79dc0791dc0df102f063c0066e","win-x64/node_pdb.7z":"654d350ee101cbb4a0246e5226169f99af763a4d4c14546370ec6dfb09cf5a47","win-x64/node_pdb.zip":"426f326d88b5a184cc74ba50f5106eca933cb3386f872ffeb5844f3916296c09","win-x86/node.exe":"78b71fd2fb792c5f24848a05119d50d02407675a54a72caf0e40b039a43fefdd","win-x86/node.lib":"459095d9bd9dc4e2d12c4284e6fc5bdc78eec8181c8327c57876499b002a59fd","win-x86/node_pdb.7z":"1d0bb57a74e836835a1f9b8c1e0bf2493d4bd095c81a8e12d05cbfbf8c363534","win-x86/node_pdb.zip":"e2b5ea28cbe965e074e61035b559efda9312044ac5d0346243c041bbb62cea73"}
                          gyp http 200 https://nodejs.org/download/release/v10.16.3/win-x64/node.lib
                          gyp http 200 https://nodejs.org/download/release/v10.16.3/win-x86/node.lib
                          gyp verb content checksum win-x64/node.lib 9f10cd25d27fc31f8fe8f5fcc5e9f27a8ba5bb79dc0791dc0df102f063c0066e
                          gyp verb content checksum win-x86/node.lib 459095d9bd9dc4e2d12c4284e6fc5bdc78eec8181c8327c57876499b002a59fd
                          gyp verb download contents checksum {"node-v10.16.3-headers.tar.gz":"0901d1f1bfe0f5d922f9d79c5822a3624c11eb0f2de9fd552425bc98c7b95e54","win-x64/node.lib":"9f10cd25d27fc31f8fe8f5fcc5e9f27a8ba5bb79dc0791dc0df102f063c0066e","win-x86/node.lib":"459095d9bd9dc4e2d12c4284e6fc5bdc78eec8181c8327c57876499b002a59fd"}
                          gyp verb validating download checksum for node-v10.16.3-headers.tar.gz (0901d1f1bfe0f5d922f9d79c5822a3624c11eb0f2de9fd552425bc98c7b95e54 == 0901d1f1bfe0f5d922f9d79c5822a3624c11eb0f2de9fd552425bc98c7b95e54)
                          gyp verb validating download checksum for win-x64/node.lib (9f10cd25d27fc31f8fe8f5fcc5e9f27a8ba5bb79dc0791dc0df102f063c0066e == 9f10cd25d27fc31f8fe8f5fcc5e9f27a8ba5bb79dc0791dc0df102f063c0066e)
                          gyp verb validating download checksum for win-x86/node.lib (459095d9bd9dc4e2d12c4284e6fc5bdc78eec8181c8327c57876499b002a59fd == 459095d9bd9dc4e2d12c4284e6fc5bdc78eec8181c8327c57876499b002a59fd)
                          

                          Metadata

                          Metadata

                          Assignees

                          No one assigned

                            Labels

                            No labels
                            No labels

                            Type

                            No type

                            Projects

                            No projects

                              Milestone

                              No milestone

                              Relationships

                              None yet

                              Development

                              No branches or pull requests

                              Issue actions

                              , 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Universal Dark Mode - works on any site\n(function() {\n var enabled = true;\n \n function applyDarkMode() {\n if (!enabled) return;\n \n // Create style element if it doesn't exist\n var style = document.getElementById('universal-dark-mode-style');\n if (!style) {\n style = document.createElement('style');\n style.id = 'universal-dark-mode-style';\n document.head.appendChild(style);\n }\n \n // Dark mode CSS - inverts colors but preserves images/video\n style.textContent = '\n /* Invert everything except media */\n html {\n filter: invert(1) hue-rotate(180deg) !important;\n background: #1a1a2e !important;\n }\n \n /* Restore images, videos, iframes, canvas */\n img, video, iframe, canvas, svg, picture, [style*=\"background-image\"] {\n filter: invert(1) hue-rotate(180deg) !important;\n }\n \n /* Preserve specific elements that should not be inverted */\n .no-dark-mode, .no-dark-mode *,\n [data-theme=\"light\"], [data-theme=\"light\"],\n .ace_editor, .ace_editor *,\n .CodeMirror, .CodeMirror *,\n .monaco-editor, .monaco-editor *,\n .markdown-body pre, .markdown-body pre *,\n .highlight, .highlight *,\n pre code, pre code * {\n filter: none !important;\n }\n \n /* Fix common UI elements */\n .modal, .popup, .dropdown-menu, .tooltip, .popover {\n filter: invert(1) hue-rotate(180deg) !important;\n background: #2d2d44 !important;\n border-color: #444 !important;\n }\n \n /* Scrollbars */\n ::-webkit-scrollbar { background: #1a1a2e !important; }\n ::-webkit-scrollbar-thumb { background: #444 !important; }\n ::-webkit-scrollbar-thumb:hover { background: #555 !important; }\n \n /* Selection */\n ::selection { background: #4ecdc4 !important; color: #1a1a2e !important; }\n ::-moz-selection { background: #4ecdc4 !important; color: #1a1a2e !important; }\n ';\n }\n \n function removeDarkMode() {\n var style = document.getElementById('universal-dark-mode-style');\n if (style) style.remove();\n }\n \n // Toggle with Alt+Shift+D\n document.addEventListener('keydown', function(e) {\n if (e.altKey && e.shiftKey && e.key === 'D') {\n e.preventDefault();\n enabled = !enabled;\n if (enabled) {\n applyDarkMode();\n console.log('[Universal Dark Mode] Enabled');\n } else {\n removeDarkMode();\n console.log('[Universal Dark Mode] Disabled');\n }\n }\n });\n \n // Apply on load\n applyDarkMode();\n \n // Re-apply on dynamic content\n var observer = new MutationObserver(function(mutations) {\n if (enabled && !document.getElementById('universal-dark-mode-style')) {\n applyDarkMode();\n }\n });\n observer.observe(document.head, { childList: true });\n \n console.log('[Universal Dark Mode] Loaded - Press Alt+Shift+D to toggle');\n})();", "Universal Dark Mode"); } } catch(__e) { console.warn('[Userscript:Universal Dark Mode]', __e); } })(); })();
                              Skip to content

                              Fails on Windows when tarPath is overridden manually #1924

                              Description

                              @s100
                              • Node Version: 10.16.3, npm version 6.9.0, node-gyp version 3.8.0
                              • Platform: Windows
                              • Compiler:
                              • Module: appmetrics
                              Verbose output (from npm or node-gyp):
                              gyp verb tarball done parsing tarball
                              gyp verb on Windows; need to download `node.lib`...
                              gyp verb 32-bit node.lib dir C:\Users\s100\.node-gyp\10.16.3\ia32
                              gyp verb 64-bit node.lib dir C:\Users\s100\.node-gyp\10.16.3\x64
                              gyp verb `node.lib` 32-bit url https://nodejs.org/download/release/v10.16.3/win-x86/node.lib
                              gyp verb `node.lib` 64-bit url https://nodejs.org/download/release/v10.16.3/win-x64/node.lib
                              gyp verb streaming 32-bit node.lib to: C:\Users\s100\.node-gyp\10.16.3\ia32\node.lib
                              gyp http GET https://nodejs.org/download/release/v10.16.3/win-x86/node.lib
                              gyp verb streaming 64-bit node.lib to: C:\Users\s100\.node-gyp\10.16.3\x64\node.lib
                              gyp http GET https://nodejs.org/download/release/v10.16.3/win-x64/node.lib
                              gyp http 200 https://nodejs.org/download/release/v10.16.3/win-x64/node.lib
                              gyp http 200 https://nodejs.org/download/release/v10.16.3/win-x86/node.lib
                              gyp verb content checksum win-x64/node.lib 9f10cd25d27fc31f8fe8f5fcc5e9f27a8ba5bb79dc0791dc0df102f063c0066e
                              gyp verb content checksum win-x86/node.lib 459095d9bd9dc4e2d12c4284e6fc5bdc78eec8181c8327c57876499b002a59fd
                              gyp verb download contents checksum {"win-x64/node.lib":"9f10cd25d27fc31f8fe8f5fcc5e9f27a8ba5bb79dc0791dc0df102f063c0066e","win-x86/node.lib":"459095d9bd9dc4e2d12c4284e6fc5bdc78eec8181c8327c57876499b002a59fd"}
                              gyp verb validating download checksum for win-x64/node.lib (9f10cd25d27fc31f8fe8f5fcc5e9f27a8ba5bb79dc0791dc0df102f063c0066e == undefined)
                              gyp WARN install got an error, rolling back install
                              

                              We are installing appmetrics, a package requiring the compilation of native code, on Windows. We have the location of the Node.js headers tarball overridden, so instead of curling https://nodejs.org/dist/v10.16.3/node-v10.16.3-headers.tar.gz, we have done something like npm config set tarball C:\node-v10.16.3-headers.tar.gz, as suggested in #1133.

                              From the code we see that if we are on Windows and have overridden the tarball location by setting tarPath, node-gyp:

                              1. downloads node.lib, populating contentShasums with its SHA256 hash (downloadNodeLib)
                              2. does not download expected SHA256 sums and populate expectShasums (downloadShaSums, which is not called)
                              3. still compares the two SHA256 sums (deref) - so it compares a valid SHA256 with undefined and fails.

                              Compare with this output if I npm config delete tarball:

                              when it works
                              gyp verb tarball done parsing tarball
                              gyp verb on Windows; need to download `node.lib`...
                              gyp verb 32-bit node.lib dir C:\Users\s100\.node-gyp\10.16.3\ia32
                              gyp verb 64-bit node.lib dir C:\Users\s100\.node-gyp\10.16.3\x64
                              gyp verb `node.lib` 32-bit url https://nodejs.org/download/release/v10.16.3/win-x86/node.lib
                              gyp verb `node.lib` 64-bit url https://nodejs.org/download/release/v10.16.3/win-x64/node.lib
                              gyp verb check download content checksum, need to download `SHASUMS256.txt`...
                              gyp verb checksum url https://nodejs.org/download/release/v10.16.3/SHASUMS256.txt
                              gyp http GET https://nodejs.org/download/release/v10.16.3/SHASUMS256.txt
                              gyp verb streaming 64-bit node.lib to: C:\Users\s100\.node-gyp\10.16.3\x64\node.lib
                              gyp http GET https://nodejs.org/download/release/v10.16.3/win-x64/node.lib
                              gyp verb streaming 32-bit node.lib to: C:\Users\s100\.node-gyp\10.16.3\ia32\node.lib
                              gyp http GET https://nodejs.org/download/release/v10.16.3/win-x86/node.lib
                              gyp http 200 https://nodejs.org/download/release/v10.16.3/SHASUMS256.txt
                              gyp verb checksum data {"node-v10.16.3-aix-ppc64.tar.gz":"1e246436e177d69354b5e3ea47579a03b68d7b61a2565972c18c3a4cb5d8ee33","node-v10.16.3-darwin-x64.tar.gz":"6febc571e1543c2845fa919c6d06b36a24e4e142c91aedbe28b6ff7d296119e4","node-v10.16.3-darwin-x64.tar.xz":"1d5ce05abf39ef482c2c3eaf16c1f4edb01314308066871d3dfc99e95701b19b","node-v10.16.3-headers.tar.gz":"0901d1f1bfe0f5d922f9d79c5822a3624c11eb0f2de9fd552425bc98c7b95e54","node-v10.16.3-headers.tar.xz":"6ceb3249ac26a098c943de8104c19d7ea5a540b02db8652b80ab54deed1e5848","node-v10.16.3-linux-arm64.tar.gz":"3bab16e7107092e43426e082ee9fd88ef0a43a35816f662f14563bcc5152600d","node-v10.16.3-linux-arm64.tar.xz":"8ee77bad022bd460bf2867a97bf56ce7ddc4aa2ace067e45995fb1721a958428","node-v10.16.3-linux-armv6l.tar.gz":"c4ce8f8627c4d0d71647987924e5369cd1adeef2865bf1bdbb4387b75fba804b","node-v10.16.3-linux-armv6l.tar.xz":"17b6ea87cde13c330a72c44be8a30ebebf83c7c71d1a1b92e1d629f273fa0743","node-v10.16.3-linux-armv7l.tar.gz":"f267710728ca56ca3b522076fff808540ea27d6aa5fd586bc0ad39c389530c3b","node-v10.16.3-linux-armv7l.tar.xz":"4a6f27308cd0cea136be6f5f7c194b0faabea016efe844fb1452c846d2eca7b1","node-v10.16.3-linux-ppc64le.tar.gz":"3e0f41b3cb991f062e1c93a297675af34d1a2f29052306cd585f1f5e25ea9159","node-v10.16.3-linux-ppc64le.tar.xz":"b51731b49f6816f5e3e670c399611eb9386f558cc2d597301fb73e585640a642","node-v10.16.3-linux-s390x.tar.gz":"ae87fa499fd5fd9d86d4f788cb4e54bd3eb4fdb735b20235537e9d38ae5da73b","node-v10.16.3-linux-s390x.tar.xz":"90cc57506c98cd5561f5dda9e103fa70083242fff2b1a39a5351fc15ff63db46","node-v10.16.3-linux-x64.tar.gz":"2f0397bb81c1d0c9901b9aff82a933257bf60f3992227b86107111a75b9030d9","node-v10.16.3-linux-x64.tar.xz":"d2271fd8cf997fa7447d638dfa92749ff18ca4b0d796bf89f2a82bf7800d5506","node-v10.16.3.pkg":"1c820559780c7a5b90ceebd819afce58f3c14805191141fbd59feb8485c2fc73","node-v10.16.3-sunos-x64.tar.gz":"d8f2418b748c4c9b1d8c1dc008b42384ca87c4c4c134df3a3009e6b7546f8b23","node-v10.16.3-sunos-x64.tar.xz":"2952da9d127c3f72fe5b3e466fbfe8a45ab3ef63263d881da7e9b586559f3693","node-v10.16.3.tar.gz":"db5a5e03a815b84a1266a4b48bb6a6d887175705f84fd2472f0d28e5e305a1f8","node-v10.16.3.tar.xz":"7bf1123d7415964775b8f81fe6ec6dd5c3c08abb42bb71dfe4409dbeeba26bbd","node-v10.16.3-win-x64.7z":"c2cc3b95d6e8504b20623cfe74f848d1ebc2f43a262e7bae14bee64db2b13889","node-v10.16.3-win-x64.zip":"19aa47de7c5950d7bd71a1e878013b98d93871cc311d7185f5472e6d3f633146","node-v10.16.3-win-x86.7z":"fc1ccb1e6f12fe68e816c552e6b1df289a8bfe064c025eb62c360bd041da4a5f","node-v10.16.3-win-x86.zip":"02a30a17c25c354747ac76fd130ff5495dde2f60f0a21ad675526951c2d7a52a","node-v10.16.3-x64.msi":"f68b75eea46232adb8fd38126c977dc244166d29e7c6cd2df930b460c38590a9","node-v10.16.3-x86.msi":"b3cf18ad447d177cf858dbe45751100846cad96ba7497cd7c1850a616758e67f","win-x64/node.exe":"cb8f5c1981e11a3d438b6867df5fb8e4f77cd29ddc0856d99b62060ef991c649","win-x64/node.lib":"9f10cd25d27fc31f8fe8f5fcc5e9f27a8ba5bb79dc0791dc0df102f063c0066e","win-x64/node_pdb.7z":"654d350ee101cbb4a0246e5226169f99af763a4d4c14546370ec6dfb09cf5a47","win-x64/node_pdb.zip":"426f326d88b5a184cc74ba50f5106eca933cb3386f872ffeb5844f3916296c09","win-x86/node.exe":"78b71fd2fb792c5f24848a05119d50d02407675a54a72caf0e40b039a43fefdd","win-x86/node.lib":"459095d9bd9dc4e2d12c4284e6fc5bdc78eec8181c8327c57876499b002a59fd","win-x86/node_pdb.7z":"1d0bb57a74e836835a1f9b8c1e0bf2493d4bd095c81a8e12d05cbfbf8c363534","win-x86/node_pdb.zip":"e2b5ea28cbe965e074e61035b559efda9312044ac5d0346243c041bbb62cea73"}
                              gyp http 200 https://nodejs.org/download/release/v10.16.3/win-x64/node.lib
                              gyp http 200 https://nodejs.org/download/release/v10.16.3/win-x86/node.lib
                              gyp verb content checksum win-x64/node.lib 9f10cd25d27fc31f8fe8f5fcc5e9f27a8ba5bb79dc0791dc0df102f063c0066e
                              gyp verb content checksum win-x86/node.lib 459095d9bd9dc4e2d12c4284e6fc5bdc78eec8181c8327c57876499b002a59fd
                              gyp verb download contents checksum {"node-v10.16.3-headers.tar.gz":"0901d1f1bfe0f5d922f9d79c5822a3624c11eb0f2de9fd552425bc98c7b95e54","win-x64/node.lib":"9f10cd25d27fc31f8fe8f5fcc5e9f27a8ba5bb79dc0791dc0df102f063c0066e","win-x86/node.lib":"459095d9bd9dc4e2d12c4284e6fc5bdc78eec8181c8327c57876499b002a59fd"}
                              gyp verb validating download checksum for node-v10.16.3-headers.tar.gz (0901d1f1bfe0f5d922f9d79c5822a3624c11eb0f2de9fd552425bc98c7b95e54 == 0901d1f1bfe0f5d922f9d79c5822a3624c11eb0f2de9fd552425bc98c7b95e54)
                              gyp verb validating download checksum for win-x64/node.lib (9f10cd25d27fc31f8fe8f5fcc5e9f27a8ba5bb79dc0791dc0df102f063c0066e == 9f10cd25d27fc31f8fe8f5fcc5e9f27a8ba5bb79dc0791dc0df102f063c0066e)
                              gyp verb validating download checksum for win-x86/node.lib (459095d9bd9dc4e2d12c4284e6fc5bdc78eec8181c8327c57876499b002a59fd == 459095d9bd9dc4e2d12c4284e6fc5bdc78eec8181c8327c57876499b002a59fd)
                              

                              Metadata

                              Metadata

                              Assignees

                              No one assigned

                                Labels

                                No labels
                                No labels

                                Type

                                No type

                                Projects

                                No projects

                                  Milestone

                                  No milestone

                                  Relationships

                                  None yet

                                  Development

                                  No branches or pull requests

                                  Issue actions