title: Npm install with two identical package.json results in different installed packages
body: <p>I got error messages due to some package version incompatibilities. So I compared the git branch were the problem began with the branch before that.</p>
  <p>The <code>package.json</code> files of those two commits are identical.
  When I go back to the earliest commit, I delete <code>node_modules</code> and run <code>npm install</code>.
  Then when I run <code>npm list depth=0</code>, (which shows the installed versions) the listed packages are the same as the ones listed in <code>package.json</code>, even those beginning with a caret , for instance <code>&quot;^3.1.2&quot;</code> is installed as 3.1.2.</p>
  <p>However when I go to the later commit and do the same procedure, I see in the list from <code>npm list</code> that some packages have been updated from the specified version in <code>package.json</code>. Which is probably the cause of the error messages (being some typescript errors).</p>
  <p>How can this happen?</p>
  <p>See for instance these examples from the problematic commit:</p>
  <p><strong>package.json</strong> ------------------------- <strong>resulting package after npm install</strong></p>
  <p>&quot;@nuxt/typescript&quot;:&quot;2.8.1&quot; - - - - - - - +-- @nuxt/typescript@2.8.1 (this is fine)</p>
  <p>&quot;@nuxt/typescript-build&quot;: &quot;^0.6.2&quot; - - -  +-- @nuxt/typescript-build@0.6.7</p>
  <p>&quot;@nuxt/typescript-runtime&quot;: &quot;^0.4.2&quot; - -  +-- @nuxt/typescript-runtime@0.4.10</p>
  <p>&quot;@nuxtjs/eslint-module&quot;: &quot;^1.1.0&quot; - - -   +-- @nuxtjs/eslint-module@1.2.0</p>
  <p>&quot;nuxt&quot;: &quot;^2.12.2&quot; - - - - - - - - - - - - - - +-- nuxt@2.15.8</p>
  <p>&quot;eslint-plugin-prettier&quot;:&quot;^3.1.2&quot; - - - - +-- eslint-plugin-prettier@3.4.1</p>
  <p>&quot;prettier&quot;: &quot;^2.0.4&quot; - - - - - - - - - - - - +-- prettier@2.5.1</p>
  <p>So in the problematic commit, <code>npm install</code> upgrades the packages having a caret before the version.
  In the earlier commit , it does <strong>not</strong> upgrade any package. And that's how I would like it to be, to get rid of the errors.</p>