title: Module not found: Can't resolve 'apollo-client'
body: <p>While migrating from apollo-boost to @apollo/client 3.x lib. for reactjs-graphql application facing this issue.</p>
  <pre><code>Failed to compile.
  ./node_modules/@apollo/react-hooks/lib/react-hooks.esm.js
  Module not found: Can't resolve 'apollo-client' in 'C:\geospat\node_modules\@apollo\react-hooks\lib'
  </code></pre>
  <p>For reference used <a href="https://www.apollographql.com/docs/react/v2/migrating/boost-migration" rel="nofollow noreferrer">apollo-boost-migration</a> and <a href="https://www.apollographql.com/docs/react/migrating/apollo-client-3-migration/" rel="nofollow noreferrer">apollo-client-3-migration</a> documents.</p>
  <p>Below is the new <em>package.json</em></p>
  <pre><code>{
    &quot;name&quot;: &quot;gui&quot;,
    &quot;version&quot;: &quot;0.1.0&quot;,
    &quot;private&quot;: true,
    &quot;dependencies&quot;: {
      &quot;@apollo/client&quot;: &quot;^3.3.21&quot;,
      &quot;graphql&quot;: &quot;14.5.8&quot;,
      &quot;@material-ui/core&quot;: &quot;^4.11.0&quot;,
      &quot;leaflet&quot;: &quot;1.5.1&quot;,
      &quot;luxon&quot;: &quot;^1.24.1&quot;,
      &quot;moment&quot;: &quot;2.24.0&quot;,
      &quot;i18next&quot;: &quot;17.0.12&quot;,
      &quot;i18next-xhr-backend&quot;: &quot;3.1.2&quot;,
      &quot;@types/jest&quot;: &quot;24.0.17&quot;,
      &quot;@types/leaflet&quot;: &quot;1.5.1&quot;,
      &quot;@types/luxon&quot;: &quot;^1.24.0&quot;,
      &quot;@types/node&quot;: &quot;12.7.1&quot;,
      &quot;@types/react&quot;: &quot;16.9.1&quot;,
      &quot;@types/react-dom&quot;: &quot;16.8.5&quot;,
      &quot;@types/react-leaflet&quot;: &quot;2.4.0&quot;,
      &quot;@types/react-loader-spinner&quot;: &quot;^3.1.0&quot;,
      &quot;@types/recharts&quot;: &quot;^1.8.16&quot;,
      &quot;classnames&quot;: &quot;2.2.6&quot;,   
      &quot;jest-sonar-reporter&quot;: &quot;2.0.0&quot;,    
      &quot;node-sass&quot;: &quot;4.12.0&quot;,
      &quot;normalize.css&quot;: &quot;8.0.1&quot;,
      &quot;numeral&quot;: &quot;2.0.6&quot;,
      &quot;ramda&quot;: &quot;0.26.1&quot;,
      &quot;react&quot;: &quot;16.12.0&quot;,
      &quot;react-apollo&quot;: &quot;3.1.3&quot;,
      &quot;react-dom&quot;: &quot;16.12.0&quot;,
      &quot;react-i18next&quot;: &quot;10.12.2&quot;,
      &quot;react-idle-timer&quot;: &quot;^4.5.2&quot;,
      &quot;react-leaflet&quot;: &quot;2.4.0&quot;,
      &quot;react-loader-spinner&quot;: &quot;^3.1.14&quot;,
      &quot;react-redux&quot;: &quot;7.1.0&quot;,
      &quot;react-router-dom&quot;: &quot;5.0.1&quot;,
      &quot;react-scripts&quot;: &quot;3.3.0&quot;,
      &quot;redux&quot;: &quot;4.0.4&quot;,
      &quot;typescript&quot;: &quot;3.5.3&quot;,
      &quot;use-query-params&quot;: &quot;0.4.5&quot;
    }, 
    &quot;devDependencies&quot;: {
      &quot;@types/classnames&quot;: &quot;2.2.9&quot;,
      &quot;@types/debug&quot;: &quot;4.1.5&quot;,
      &quot;@types/enzyme&quot;: &quot;3.10.3&quot;,
      &quot;@types/enzyme-adapter-react-16&quot;: &quot;1.0.5&quot;,
      &quot;@types/enzyme-to-json&quot;: &quot;1.5.3&quot;,
      &quot;@types/ramda&quot;: &quot;0.26.29&quot;,
      &quot;@types/react-redux&quot;: &quot;7.1.1&quot;,
      &quot;@types/react-router-dom&quot;: &quot;4.3.5&quot;,
      &quot;@types/redux-mock-store&quot;: &quot;1.0.1&quot;,
      &quot;enzyme&quot;: &quot;3.10.0&quot;,
      &quot;enzyme-adapter-react-16&quot;: &quot;1.14.0&quot;,
      &quot;enzyme-to-json&quot;: &quot;3.4.0&quot;,
      &quot;mock-apollo-client&quot;: &quot;1.1.0&quot;,
      &quot;react-dates&quot;: &quot;21.0.1&quot;,
      &quot;react-leaflet-vectorgrid&quot;: &quot;2.2.1&quot;,
      &quot;recharts&quot;: &quot;1.7.1&quot;,
      &quot;redux-devtools-extension&quot;: &quot;2.13.8&quot;,
      &quot;redux-mock-store&quot;: &quot;1.5.3&quot;,
      &quot;waait&quot;: &quot;1.0.5&quot;
    },  
    &quot;eslintConfig&quot;: {
      &quot;extends&quot;: &quot;react-app&quot;
    },
    &quot;browserslist&quot;: {
      &quot;production&quot;: [
        &quot;&gt;0.2%&quot;,
        &quot;not dead&quot;,
        &quot;not op_mini all&quot;
      ],
      &quot;development&quot;: [
        &quot;last 1 chrome version&quot;,
        &quot;last 1 firefox version&quot;,
        &quot;last 1 safari version&quot;
      ]
    },  
    &quot;jest&quot;: {
      &quot;collectCoverageFrom&quot;: [
        &quot;!src/**/*.snap&quot;,
        &quot;src/components/**/*.{ts,tsx}&quot;,
        &quot;src/configuration/**/*&quot;
      ],
      &quot;transformIgnorePatterns&quot;: []
    },
    &quot;jestSonar&quot;: {
      &quot;reportPath&quot;: &quot;coverage&quot;,
      &quot;reportFile&quot;: &quot;jest-sonar-report.xml&quot;,
      &quot;indent&quot;: 4
    }
  }
  </code></pre>
  <p>Tried deleting old node_modules directory and then ran <code>npm i</code> command but the same error was shown on the console.<br />
  What is missed here?</p>