<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">I see npm is using project specific repositories containing the libraries used in the particular project. The issue is this creates duplicate library files for the ones used in multiple projects as Angular/react framework libraries. This effectively creates disk space issue in case you are working on multiple projects common for most enterprise developers. Also, long download time.</p>
<p dir="auto">In sense there is already mature maven ecosystem that already solves this problem by using local central repository containing <strong>versioned</strong> libraries and than each project can refer to the library version that it needs. This saves lot of disc space.</p>
<p dir="auto">In sense version conflicts should not be the reason, you can maintain versioned dependencies. I guess the problem is solved by yarn. I am new to npm ecosystem request help here.</p>
<h3 dir="auto">Expected Behavior</h3>
<p dir="auto">Use central local repositories that contain versioned libraries and refer those in project -- Maven like</p>
<h3 dir="auto">Steps To Reproduce</h3>
<p dir="auto">npx create-react-app my-app</p>
<p dir="auto">creates local node modules folder with all app dependencies.</p>
<h3 dir="auto">Environment</h3>
<ul dir="auto">
<li>npm:</li>
<li>Node.js:</li>
<li>OS Name: Windows</li>
<li>System Model Name:</li>
<li>npm config:</li>
</ul>
<div class="highlight highlight-source-ini notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="
; cli configs
metrics-registry = &quot;https://registry.npmjs.org/&quot;
scope = &quot;&quot;
user-agent = &quot;npm/6.14.6 node/v12.18.3 win32 x64&quot;

; builtin config undefined
prefix = &quot;C:\\Users\\ABC\\AppData\\Roaming\\npm&quot;

; node bin location = C:\Program Files\nodejs\node.exe
; cwd = C:\Users\ABC
; HOME = C:\Users\ABC
; &quot;npm config ls -l&quot; to show all defaults."><pre class="notranslate"><span class="pl-c"><span class="pl-c">;</span> cli configs</span>
<span class="pl-k">metrics-registry</span> = <span class="pl-s"><span class="pl-pds">"</span>https://registry.npmjs.org/<span class="pl-pds">"</span></span>
<span class="pl-k">scope</span> = <span class="pl-s"><span class="pl-pds">"</span><span class="pl-pds">"</span></span>
<span class="pl-k">user-agent</span> = <span class="pl-s"><span class="pl-pds">"</span>npm/6.14.6 node/v12.18.3 win32 x64<span class="pl-pds">"</span></span>

<span class="pl-c"><span class="pl-c">;</span> builtin config undefined</span>
<span class="pl-k">prefix</span> = <span class="pl-s"><span class="pl-pds">"</span>C:\\Users\\ABC\\AppData\\Roaming\\npm<span class="pl-pds">"</span></span>

<span class="pl-c"><span class="pl-c">;</span> node bin location = C:\Program Files\nodejs\node.exe</span>
<span class="pl-c"><span class="pl-c">;</span> cwd = C:\Users\ABC</span>
<span class="pl-c"><span class="pl-c">;</span> HOME = C:\Users\ABC</span>
<span class="pl-c"><span class="pl-c">;</span> "npm config ls -l" to show all defaults.</span></pre></div>
<h3 dir="auto">Current Behavior:</h3>
<p dir="auto">While trying to install packages from GitHub package repository, I get 401 error when using npm v7 (tried with 7.3 and 7.4.2) while it's working with v6 (6.14.11)</p>
<p dir="auto">Full error:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="npm ERR! code E401
npm ERR! Incorrect or missing password.
npm ERR! If you were trying to login, change your password, create an
npm ERR! authentication token or enable two-factor authentication then
npm ERR! that means you likely typed your password in incorrectly.
npm ERR! Please try again, or recover your password at:
npm ERR!     https://www.npmjs.com/forgot
npm ERR!
npm ERR! If you were doing some other operation then your saved credentials are
npm ERR! probably out of date. To correct this please try logging in again with:
npm ERR!     npm login

npm ERR! A complete log of this run can be found in:
npm ERR!     /root/.npm/_logs/2021-01-19T01_46_36_935Z-debug.log"><pre class="notranslate"><code class="notranslate">npm ERR! code E401
npm ERR! Incorrect or missing password.
npm ERR! If you were trying to login, change your password, create an
npm ERR! authentication token or enable two-factor authentication then
npm ERR! that means you likely typed your password in incorrectly.
npm ERR! Please try again, or recover your password at:
npm ERR!     https://www.npmjs.com/forgot
npm ERR!
npm ERR! If you were doing some other operation then your saved credentials are
npm ERR! probably out of date. To correct this please try logging in again with:
npm ERR!     npm login

npm ERR! A complete log of this run can be found in:
npm ERR!     /root/.npm/_logs/2021-01-19T01_46_36_935Z-debug.log
</code></pre></div>
<p dir="auto">My <code class="notranslate">.npmrc</code> is as follows:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="//npm.pkg.github.com/:_authToken=&lt;token&gt;
//npm.pkg.github.com/:always-auth=true
@stvad:registry=https://npm.pkg.github.com"><pre class="notranslate"><code class="notranslate">//npm.pkg.github.com/:_authToken=&lt;token&gt;
//npm.pkg.github.com/:always-auth=true
@stvad:registry=https://npm.pkg.github.com
</code></pre></div>
<p dir="auto">Seems very similar to <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="744217394" data-permission-text="Title is private" data-url="https://github.com/npm/cli/issues/2183" data-hovercard-type="issue" data-hovercard-url="/npm/cli/issues/2183/hovercard" href="https://github.com/npm/cli/issues/2183">#2183</a></p>
<h3 dir="auto">Expected Behavior:</h3>
<p dir="auto">Packages are successfully installed</p>
<h3 dir="auto">Steps To Reproduce:</h3>
<p dir="auto">Do <code class="notranslate">npm install</code> with npm v7, packages hosted in GitHub packages registry and <code class="notranslate">.npmrc</code> as mentioned above</p>
<h3 dir="auto">Environment:</h3>
<p dir="auto">Happens to me both on macOS and in several Linux versions inside</p>
<ul dir="auto">
<li>OS macOS 10.15.7/ Debian stretch</li>
<li>Node: 15.5.1</li>
<li>npm: 7.4.2</li>
</ul>