<h3 dir="auto">Is there an existing issue for this?</h3>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have searched the existing issues</li>
</ul>
<h3 dir="auto">This issue exists in the latest npm version</h3>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I am using the latest npm</li>
</ul>
<h3 dir="auto">Current Behavior</h3>
<p dir="auto">We have a number of node14 projects that we are in the process of upgrading to 16 (and if we aren't careful, the LTS train will have moved on before we get there!).</p>
<p dir="auto">Can anyone explain what has changed in npm 8(?), that could cause git+ssh dependencies to fail? I have a (fairly) minimal <a href="https://github.com/grahamrhay/npm-chown">repro</a> here, but almost no theory as to what could cause it. I don't know if it is related to docker, or npm, or some combination of the two.</p>
<p dir="auto">The <code class="notranslate">main</code> branch builds fine:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="$ make build
Building the image...
DOCKER_BUILDKIT=1 docker build --ssh default -t npm-chown .
[+] Building 2.2s (14/14) FINISHED                                                                                                                                                            
 =&gt; [internal] load build definition from Dockerfile                                                                                                                                     0.0s
 =&gt; =&gt; transferring dockerfile: 450B                                                                                                                                                     0.0s
 =&gt; [internal] load .dockerignore                                                                                                                                                        0.0s
 =&gt; =&gt; transferring context: 2B                                                                                                                                                          0.0s
 =&gt; resolve image config for docker.io/docker/dockerfile:experimental                                                                                                                    1.0s
 =&gt; CACHED docker-image://docker.io/docker/dockerfile:experimental@sha256:600e5c62eedff338b3f7a0850beb7c05866e0ef27b2d2e8c02aa468e78496ff5                                               0.0s
 =&gt; [internal] load metadata for docker.io/library/node:14-alpine                                                                                                                        1.0s
 =&gt; [internal] load build context                                                                                                                                                        0.0s
 =&gt; =&gt; transferring context: 69B                                                                                                                                                         0.0s
 =&gt; [1/7] FROM docker.io/library/node:14-alpine@sha256:e22ee6a906e823dc592d6022a3f520676575b50320fe2c3916c88acb16f471ce                                                                  0.0s
 =&gt; CACHED [2/7] RUN apk --no-cache --virtual build-dependencies add     make     g++     git     openssh                                                                                0.0s
 =&gt; CACHED [3/7] RUN mkdir -p /root/.ssh &amp;&amp;     chmod 0700 /root/.ssh &amp;&amp;     ssh-keyscan github.com &gt;&gt; /root/.ssh/known_hosts                                                            0.0s
 =&gt; CACHED [4/7] WORKDIR /app/                                                                                                                                                           0.0s
 =&gt; CACHED [5/7] RUN chown -R node $PWD                                                                                                                                                  0.0s
 =&gt; CACHED [6/7] ADD ./service/package.json .                                                                                                                                            0.0s
 =&gt; CACHED [7/7] RUN --mount=type=ssh npm i                                                                                                                                              0.0s
 =&gt; exporting to image                                                                                                                                                                   0.0s
 =&gt; =&gt; exporting layers                                                                                                                                                                  0.0s
 =&gt; =&gt; writing image sha256:fa984c52481af4a483017351da9902eb627eccdfc2f837ead12a73812b1bf14d                                                                                             0.0s
 =&gt; =&gt; naming to docker.io/library/npm-chown   "><pre class="notranslate"><code class="notranslate">$ make build
Building the image...
DOCKER_BUILDKIT=1 docker build --ssh default -t npm-chown .
[+] Building 2.2s (14/14) FINISHED                                                                                                                                                            
 =&gt; [internal] load build definition from Dockerfile                                                                                                                                     0.0s
 =&gt; =&gt; transferring dockerfile: 450B                                                                                                                                                     0.0s
 =&gt; [internal] load .dockerignore                                                                                                                                                        0.0s
 =&gt; =&gt; transferring context: 2B                                                                                                                                                          0.0s
 =&gt; resolve image config for docker.io/docker/dockerfile:experimental                                                                                                                    1.0s
 =&gt; CACHED docker-image://docker.io/docker/dockerfile:experimental@sha256:600e5c62eedff338b3f7a0850beb7c05866e0ef27b2d2e8c02aa468e78496ff5                                               0.0s
 =&gt; [internal] load metadata for docker.io/library/node:14-alpine                                                                                                                        1.0s
 =&gt; [internal] load build context                                                                                                                                                        0.0s
 =&gt; =&gt; transferring context: 69B                                                                                                                                                         0.0s
 =&gt; [1/7] FROM docker.io/library/node:14-alpine@sha256:e22ee6a906e823dc592d6022a3f520676575b50320fe2c3916c88acb16f471ce                                                                  0.0s
 =&gt; CACHED [2/7] RUN apk --no-cache --virtual build-dependencies add     make     g++     git     openssh                                                                                0.0s
 =&gt; CACHED [3/7] RUN mkdir -p /root/.ssh &amp;&amp;     chmod 0700 /root/.ssh &amp;&amp;     ssh-keyscan github.com &gt;&gt; /root/.ssh/known_hosts                                                            0.0s
 =&gt; CACHED [4/7] WORKDIR /app/                                                                                                                                                           0.0s
 =&gt; CACHED [5/7] RUN chown -R node $PWD                                                                                                                                                  0.0s
 =&gt; CACHED [6/7] ADD ./service/package.json .                                                                                                                                            0.0s
 =&gt; CACHED [7/7] RUN --mount=type=ssh npm i                                                                                                                                              0.0s
 =&gt; exporting to image                                                                                                                                                                   0.0s
 =&gt; =&gt; exporting layers                                                                                                                                                                  0.0s
 =&gt; =&gt; writing image sha256:fa984c52481af4a483017351da9902eb627eccdfc2f837ead12a73812b1bf14d                                                                                             0.0s
 =&gt; =&gt; naming to docker.io/library/npm-chown   
</code></pre></div>
<p dir="auto">but the other two branches fail like this:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="$ make build
Building the image...
DOCKER_BUILDKIT=1 docker build --ssh default -t npm-chown .
[+] Building 11.3s (14/14) FINISHED                                                                                                                                                           
 =&gt; [internal] load build definition from Dockerfile                                                                                                                                     0.0s
 =&gt; =&gt; transferring dockerfile: 467B                                                                                                                                                     0.0s
 =&gt; [internal] load .dockerignore                                                                                                                                                        0.0s
 =&gt; =&gt; transferring context: 2B                                                                                                                                                          0.0s
 =&gt; resolve image config for docker.io/docker/dockerfile:experimental                                                                                                                    0.8s
 =&gt; CACHED docker-image://docker.io/docker/dockerfile:experimental@sha256:600e5c62eedff338b3f7a0850beb7c05866e0ef27b2d2e8c02aa468e78496ff5                                               0.0s
 =&gt; [internal] load metadata for docker.io/library/node:14-alpine                                                                                                                        0.7s
 =&gt; [1/8] FROM docker.io/library/node:14-alpine@sha256:e22ee6a906e823dc592d6022a3f520676575b50320fe2c3916c88acb16f471ce                                                                  0.0s
 =&gt; [internal] load build context                                                                                                                                                        0.0s
 =&gt; =&gt; transferring context: 69B                                                                                                                                                         0.0s
 =&gt; CACHED [2/8] RUN apk --no-cache --virtual build-dependencies add     make     g++     git     openssh                                                                                0.0s
 =&gt; CACHED [3/8] RUN mkdir -p /root/.ssh &amp;&amp;     chmod 0700 /root/.ssh &amp;&amp;     ssh-keyscan github.com &gt;&gt; /root/.ssh/known_hosts                                                            0.0s
 =&gt; CACHED [4/8] WORKDIR /app/                                                                                                                                                           0.0s
 =&gt; CACHED [5/8] RUN chown -R node $PWD                                                                                                                                                  0.0s
 =&gt; CACHED [6/8] ADD ./service/package.json .                                                                                                                                            0.0s
 =&gt; [7/8] RUN npm i -g npm                                                                                                                                                               7.2s
 =&gt; ERROR [8/8] RUN --mount=type=ssh npm i                                                                                                                                               2.3s
------                                                                                                                                                                                        
 &gt; [8/8] RUN --mount=type=ssh npm i:                                                                                                                                                          
#14 2.263 npm ERR! code 128                                                                                                                                                                   
#14 2.266 npm ERR! An unknown git error occurred
#14 2.267 npm ERR! command git --no-replace-objects ls-remote ssh://git@github.com/jashkenas/underscore.git
#14 2.267 npm ERR! Warning: Permanently added 'github.com' (ED25519) to the list of known hosts.
#14 2.267 npm ERR! git@github.com: Permission denied (publickey).
#14 2.267 npm ERR! fatal: Could not read from remote repository.
#14 2.267 npm ERR! 
#14 2.267 npm ERR! Please make sure you have the correct access rights
#14 2.267 npm ERR! and the repository exists.
#14 2.269 
#14 2.270 npm ERR! A complete log of this run can be found in:
#14 2.270 npm ERR!     /root/.npm/_logs/2022-08-09T11_50_52_370Z-debug-0.log
------
executor failed running [/bin/sh -c npm i]: exit code: 128
make: *** [Makefile:7: build] Error 1"><pre class="notranslate"><code class="notranslate">$ make build
Building the image...
DOCKER_BUILDKIT=1 docker build --ssh default -t npm-chown .
[+] Building 11.3s (14/14) FINISHED                                                                                                                                                           
 =&gt; [internal] load build definition from Dockerfile                                                                                                                                     0.0s
 =&gt; =&gt; transferring dockerfile: 467B                                                                                                                                                     0.0s
 =&gt; [internal] load .dockerignore                                                                                                                                                        0.0s
 =&gt; =&gt; transferring context: 2B                                                                                                                                                          0.0s
 =&gt; resolve image config for docker.io/docker/dockerfile:experimental                                                                                                                    0.8s
 =&gt; CACHED docker-image://docker.io/docker/dockerfile:experimental@sha256:600e5c62eedff338b3f7a0850beb7c05866e0ef27b2d2e8c02aa468e78496ff5                                               0.0s
 =&gt; [internal] load metadata for docker.io/library/node:14-alpine                                                                                                                        0.7s
 =&gt; [1/8] FROM docker.io/library/node:14-alpine@sha256:e22ee6a906e823dc592d6022a3f520676575b50320fe2c3916c88acb16f471ce                                                                  0.0s
 =&gt; [internal] load build context                                                                                                                                                        0.0s
 =&gt; =&gt; transferring context: 69B                                                                                                                                                         0.0s
 =&gt; CACHED [2/8] RUN apk --no-cache --virtual build-dependencies add     make     g++     git     openssh                                                                                0.0s
 =&gt; CACHED [3/8] RUN mkdir -p /root/.ssh &amp;&amp;     chmod 0700 /root/.ssh &amp;&amp;     ssh-keyscan github.com &gt;&gt; /root/.ssh/known_hosts                                                            0.0s
 =&gt; CACHED [4/8] WORKDIR /app/                                                                                                                                                           0.0s
 =&gt; CACHED [5/8] RUN chown -R node $PWD                                                                                                                                                  0.0s
 =&gt; CACHED [6/8] ADD ./service/package.json .                                                                                                                                            0.0s
 =&gt; [7/8] RUN npm i -g npm                                                                                                                                                               7.2s
 =&gt; ERROR [8/8] RUN --mount=type=ssh npm i                                                                                                                                               2.3s
------                                                                                                                                                                                        
 &gt; [8/8] RUN --mount=type=ssh npm i:                                                                                                                                                          
#14 2.263 npm ERR! code 128                                                                                                                                                                   
#14 2.266 npm ERR! An unknown git error occurred
#14 2.267 npm ERR! command git --no-replace-objects ls-remote ssh://git@github.com/jashkenas/underscore.git
#14 2.267 npm ERR! Warning: Permanently added 'github.com' (ED25519) to the list of known hosts.
#14 2.267 npm ERR! git@github.com: Permission denied (publickey).
#14 2.267 npm ERR! fatal: Could not read from remote repository.
#14 2.267 npm ERR! 
#14 2.267 npm ERR! Please make sure you have the correct access rights
#14 2.267 npm ERR! and the repository exists.
#14 2.269 
#14 2.270 npm ERR! A complete log of this run can be found in:
#14 2.270 npm ERR!     /root/.npm/_logs/2022-08-09T11_50_52_370Z-debug-0.log
------
executor failed running [/bin/sh -c npm i]: exit code: 128
make: *** [Makefile:7: build] Error 1
</code></pre></div>
<p dir="auto">I have a workaround, to move the <code class="notranslate">chown</code> after <code class="notranslate">npm i</code>, but that takes my build time from ~1 min to ~12 mins. which isn't ideal.</p>
<h3 dir="auto">Expected Behavior</h3>
<p dir="auto">I would expect it to work the same as npm6</p>
<h3 dir="auto">Steps To Reproduce</h3>
<p dir="auto">see above</p>
<h3 dir="auto">Environment</h3>
<p dir="auto">see above</p>
<h3 dir="auto">Is there an existing issue for this?</h3>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have searched the existing issues</li>
</ul>
<h3 dir="auto">Current Behavior</h3>
<p dir="auto">After upgrading from npm 6 to npm 8.1.1, <code class="notranslate">npm install</code> started failing. This happens with npm 7.24.2 as well. I used <code class="notranslate">--loglevel verbose</code> and found the following:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="npm timing command:install Completed in 29728ms
npm verb stack Error: git dep preparation failed
npm verb stack     at ChildProcess.&lt;anonymous&gt; (C:\Users\RudeySH\AppData\Roaming\npm\node_modules\npm\node_modules\@npmcli\promise-spawn\index.js:64:27)
npm verb stack     at ChildProcess.emit (events.js:400:28)
npm verb stack     at maybeClose (internal/child_process.js:1058:16)
npm verb stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:293:5)
npm verb cwd E:\Sync\Projects\SteamHunters\SteamHunters\src\SteamHunters.Web.Mvc
npm verb Windows_NT 10.0.19042
npm verb argv &quot;C:\\Program Files (x86)\\nodejs\\node.exe&quot; &quot;C:\\Users\\RudeySH\\AppData\\Roaming\\npm\\node_modules\\npm\\bin\\npm-cli.js&quot; &quot;install&quot; &quot;--loglevel&quot; &quot;verbose&quot;
npm verb node v14.18.1
npm verb npm  v8.1.1
npm ERR! code 1
npm ERR! git dep preparation failed
npm ERR! command C:\Program Files (x86)\nodejs\node.exe C:\Users\RudeySH\AppData\Roaming\npm\node_modules\npm\bin\npm-cli.js install --force --cache=C:\Users\RudeySH\AppData\Local\npm-cache --prefer-offline=false --prefer-online=false --offline=false --no-progress --no-save --no-audit --include=dev --include=peer --include=optional --no-package-lock-only --no-dry-run
npm ERR! npm verb cli [
npm ERR! npm verb cli   'C:\\Program Files (x86)\\nodejs\\node.exe',
npm ERR! npm verb cli   'C:\\Users\\RudeySH\\AppData\\Roaming\\npm\\node_modules\\npm\\bin\\npm-cli.js',
npm ERR! npm verb cli   'install',
npm ERR! npm verb cli   '--force',
npm ERR! npm verb cli   '--cache=C:\\Users\\RudeySH\\AppData\\Local\\npm-cache',
npm ERR! npm verb cli   '--prefer-offline=false',
npm ERR! npm verb cli   '--prefer-online=false',
npm ERR! npm verb cli   '--offline=false',
npm ERR! npm verb cli   '--no-progress',
npm ERR! npm verb cli   '--no-save',
npm ERR! npm verb cli   '--no-audit',
npm ERR! npm verb cli   '--include=dev',
npm ERR! npm verb cli   '--include=peer',
npm ERR! npm verb cli   '--include=optional',
npm ERR! npm verb cli   '--no-package-lock-only',
npm ERR! npm verb cli   '--no-dry-run'
npm ERR! npm verb cli ]"><pre class="notranslate"><code class="notranslate">npm timing command:install Completed in 29728ms
npm verb stack Error: git dep preparation failed
npm verb stack     at ChildProcess.&lt;anonymous&gt; (C:\Users\RudeySH\AppData\Roaming\npm\node_modules\npm\node_modules\@npmcli\promise-spawn\index.js:64:27)
npm verb stack     at ChildProcess.emit (events.js:400:28)
npm verb stack     at maybeClose (internal/child_process.js:1058:16)
npm verb stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:293:5)
npm verb cwd E:\Sync\Projects\SteamHunters\SteamHunters\src\SteamHunters.Web.Mvc
npm verb Windows_NT 10.0.19042
npm verb argv "C:\\Program Files (x86)\\nodejs\\node.exe" "C:\\Users\\RudeySH\\AppData\\Roaming\\npm\\node_modules\\npm\\bin\\npm-cli.js" "install" "--loglevel" "verbose"
npm verb node v14.18.1
npm verb npm  v8.1.1
npm ERR! code 1
npm ERR! git dep preparation failed
npm ERR! command C:\Program Files (x86)\nodejs\node.exe C:\Users\RudeySH\AppData\Roaming\npm\node_modules\npm\bin\npm-cli.js install --force --cache=C:\Users\RudeySH\AppData\Local\npm-cache --prefer-offline=false --prefer-online=false --offline=false --no-progress --no-save --no-audit --include=dev --include=peer --include=optional --no-package-lock-only --no-dry-run
npm ERR! npm verb cli [
npm ERR! npm verb cli   'C:\\Program Files (x86)\\nodejs\\node.exe',
npm ERR! npm verb cli   'C:\\Users\\RudeySH\\AppData\\Roaming\\npm\\node_modules\\npm\\bin\\npm-cli.js',
npm ERR! npm verb cli   'install',
npm ERR! npm verb cli   '--force',
npm ERR! npm verb cli   '--cache=C:\\Users\\RudeySH\\AppData\\Local\\npm-cache',
npm ERR! npm verb cli   '--prefer-offline=false',
npm ERR! npm verb cli   '--prefer-online=false',
npm ERR! npm verb cli   '--offline=false',
npm ERR! npm verb cli   '--no-progress',
npm ERR! npm verb cli   '--no-save',
npm ERR! npm verb cli   '--no-audit',
npm ERR! npm verb cli   '--include=dev',
npm ERR! npm verb cli   '--include=peer',
npm ERR! npm verb cli   '--include=optional',
npm ERR! npm verb cli   '--no-package-lock-only',
npm ERR! npm verb cli   '--no-dry-run'
npm ERR! npm verb cli ]
</code></pre></div>
<p dir="auto">It get's more interesting a bit further down in the log:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="npm ERR! npm timing build:link Completed in 126ms
npm ERR! npm info run iltorb@2.4.3 install node_modules/iltorb node ./scripts/install.js || node-gyp rebuild
npm ERR! npm info run iltorb@2.4.3 install { code: 1, signal: null }
npm ERR! npm timing reify:rollback:createSparse Completed in 1809ms
npm ERR! npm timing reify:rollback:retireShallow Completed in 0ms
npm ERR! npm timing command:install Completed in 13304ms
npm ERR! npm verb stack Error: command failed
npm ERR! npm verb stack     at ChildProcess.&lt;anonymous&gt; (C:\Users\RudeySH\AppData\Roaming\npm\node_modules\npm\node_modules\@npmcli\promise-spawn\index.js:64:27)
npm ERR! npm verb stack     at ChildProcess.emit (events.js:400:28)
npm ERR! npm verb stack     at maybeClose (internal/child_process.js:1058:16)
npm ERR! npm verb stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:293:5)
npm ERR! npm verb pkgid iltorb@2.4.3
npm ERR! npm verb cwd C:\Users\RudeySH\AppData\Local\npm-cache\_cacache\tmp\git-cloneO1YrvZ
npm ERR! npm verb Windows_NT 10.0.19042
npm ERR! npm verb argv &quot;C:\\Program Files (x86)\\nodejs\\node.exe&quot; &quot;C:\\Users\\RudeySH\\AppData\\Roaming\\npm\\node_modules\\npm\\bin\\npm-cli.js&quot; &quot;install&quot; &quot;--force&quot; &quot;--cache=C:\\Users\\RudeySH\\AppData\\Local\\npm-cache&quot; &quot;--prefer-offline=false&quot; &quot;--prefer-online=false&quot; &quot;--offline=false&quot; &quot;--no-progress&quot; &quot;--no-save&quot; &quot;--no-audit&quot; &quot;--include=dev&quot; &quot;--include=peer&quot; &quot;--include=optional&quot; &quot;--no-package-lock-only&quot; &quot;--no-dry-run&quot;
npm ERR! npm verb node v14.18.1
npm ERR! npm verb npm  v8.1.1
npm ERR! npm ERR! code 1
npm ERR! npm ERR! path C:\Users\RudeySH\AppData\Local\npm-cache\_cacache\tmp\git-cloneO1YrvZ\node_modules\iltorb
npm ERR! npm ERR! command failed
npm ERR! npm ERR! command C:\WINDOWS\system32\cmd.exe /d /s /c node ./scripts/install.js || node-gyp rebuild"><pre class="notranslate"><code class="notranslate">npm ERR! npm timing build:link Completed in 126ms
npm ERR! npm info run iltorb@2.4.3 install node_modules/iltorb node ./scripts/install.js || node-gyp rebuild
npm ERR! npm info run iltorb@2.4.3 install { code: 1, signal: null }
npm ERR! npm timing reify:rollback:createSparse Completed in 1809ms
npm ERR! npm timing reify:rollback:retireShallow Completed in 0ms
npm ERR! npm timing command:install Completed in 13304ms
npm ERR! npm verb stack Error: command failed
npm ERR! npm verb stack     at ChildProcess.&lt;anonymous&gt; (C:\Users\RudeySH\AppData\Roaming\npm\node_modules\npm\node_modules\@npmcli\promise-spawn\index.js:64:27)
npm ERR! npm verb stack     at ChildProcess.emit (events.js:400:28)
npm ERR! npm verb stack     at maybeClose (internal/child_process.js:1058:16)
npm ERR! npm verb stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:293:5)
npm ERR! npm verb pkgid iltorb@2.4.3
npm ERR! npm verb cwd C:\Users\RudeySH\AppData\Local\npm-cache\_cacache\tmp\git-cloneO1YrvZ
npm ERR! npm verb Windows_NT 10.0.19042
npm ERR! npm verb argv "C:\\Program Files (x86)\\nodejs\\node.exe" "C:\\Users\\RudeySH\\AppData\\Roaming\\npm\\node_modules\\npm\\bin\\npm-cli.js" "install" "--force" "--cache=C:\\Users\\RudeySH\\AppData\\Local\\npm-cache" "--prefer-offline=false" "--prefer-online=false" "--offline=false" "--no-progress" "--no-save" "--no-audit" "--include=dev" "--include=peer" "--include=optional" "--no-package-lock-only" "--no-dry-run"
npm ERR! npm verb node v14.18.1
npm ERR! npm verb npm  v8.1.1
npm ERR! npm ERR! code 1
npm ERR! npm ERR! path C:\Users\RudeySH\AppData\Local\npm-cache\_cacache\tmp\git-cloneO1YrvZ\node_modules\iltorb
npm ERR! npm ERR! command failed
npm ERR! npm ERR! command C:\WINDOWS\system32\cmd.exe /d /s /c node ./scripts/install.js || node-gyp rebuild
</code></pre></div>
<p dir="auto">I'm not sure why the cli is using the deprecated <code class="notranslate">iltorb</code> package, but it's readme states the following:</p>
<blockquote>
<h3 dir="auto">Prerequisites for Building</h3>
<p dir="auto">The following is required to build from source or when a <a href="https://github.com/nstepien/iltorb/releases">pre-compiled binary</a> does not exist.</p>
<ul dir="auto">
<li>Python 2.7</li>
<li>GCC 4.8+ (Unix) or <a href="https://github.com/felixrieseberg/windows-build-tools">windows-build-tools</a> (Windows), see <a href="https://github.com/nodejs/node-gyp#installation">Node Building tools</a>.</li>
</ul>
</blockquote>
<p dir="auto">I'm guessing a pre-compiled binary doesn't exist, and that is why it's calling <code class="notranslate">node-gyp rebuild</code>.</p>
<p dir="auto">I don't have Python nor <code class="notranslate">windows-build-tools</code> nor Visual C/C++ Build Tools installed, and I don't want to. I'm not trying to build native addons for for Node.js, after all.</p>
<h3 dir="auto">Expected Behavior</h3>
<p dir="auto">Npm 7 and later versions should not require developers to install Python, nor should it require developers to install C/C++ development tools, if their project does not involve building native addons for Node.js. Just like npm 6 didn't have this requirement.</p>
<h3 dir="auto">Steps To Reproduce</h3>
<ol dir="auto">
<li>Install npm@8.1.1 on a machine that does not have Python or C/C++ development tools</li>
<li>In a new empty folder, run <code class="notranslate">npm init -y</code></li>
<li>Install a popular npm package, for example <code class="notranslate">npm i -D microbundle@0.11.0</code></li>
<li>Run <code class="notranslate">npm install</code></li>
<li>See error...</li>
</ol>
<h3 dir="auto">Environment</h3>
<ul dir="auto">
<li>OS: Windows_NT 10.0.19042</li>
<li>Node: v14.18.1</li>
<li>npm: v8.1.1</li>
</ul>