title: Angular 12 aws-sdk 2.910.0 Error: Module not found: Error: Can't resolve 'util' in '.\.\.\node_modules\aws-sdk\lib'
body: <p>Prior to moving from Angular 11 to 12 the following error did not occur and the application was able to use the <code>aws-sdk</code> library to access my S3 buckets:</p>
  <pre><code>./node_modules/aws-sdk/lib/event_listeners.js:572:21-44 - Error: Module not found: Error: Can't resolve 'util' in 'S:\Source\sttutter-ui\node_modules\aws-sdk\lib'
  Did you mean './util'?
  Requests that should resolve in the current directory need to start with './'.
  Requests that start with a name are treated as module requests and resolve within module directories (S:/Source/sttutter-ui, node_modules).
  If changing the source code is not an option there is also a resolve options called 'preferRelative' which tries to resolve these kind of requests in the current directory too.
  
  BREAKING CHANGE: webpack &lt; 5 used to include polyfills for node.js core modules by default.
  This is no longer the case. Verify if you need this module and configure a polyfill for it.
  
  If you want to include a polyfill, you need to:
          - add a fallback 'resolve.fallback: { &quot;util&quot;: require.resolve(&quot;util/&quot;) }'
          - install 'util'
  If you don't want to include a polyfill, you can use an empty module like this:
          resolve.fallback: { &quot;util&quot;: false }
  
  </code></pre>
  <p><code>package.json</code></p>
  <pre><code>{
    &quot;name&quot;: &quot;x&quot;,
    &quot;version&quot;: &quot;0.0.0&quot;,
    &quot;license&quot;: &quot;commercial&quot;,
    &quot;private&quot;: true,
    &quot;engines&quot;: {
      &quot;node&quot;: &quot;&gt;= 10.0.0&quot;
    },
    &quot;dependencies&quot;: {
      &quot;@angular/animations&quot;: &quot;~12.0.1&quot;,
      &quot;@angular/common&quot;: &quot;~12.0.1&quot;,
      &quot;@angular/compiler&quot;: &quot;~12.0.1&quot;,
      &quot;@angular/core&quot;: &quot;~12.0.1&quot;,
      &quot;@angular/forms&quot;: &quot;~12.0.1&quot;,
      &quot;@angular/platform-browser&quot;: &quot;~12.0.1&quot;,
      &quot;@angular/platform-browser-dynamic&quot;: &quot;~12.0.1&quot;,
      &quot;@angular/router&quot;: &quot;~12.0.1&quot;,
      &quot;@ng-bootstrap/ng-bootstrap&quot;: &quot;^9.1.1&quot;,
      &quot;@ngrx/store&quot;: &quot;^12.0.0&quot;,
      &quot;aws-sdk&quot;: &quot;^2.910.0&quot;,
      &quot;ngrx-store-freeze&quot;: &quot;^0.2.4&quot;,
      &quot;ngrx-store-logger&quot;: &quot;^0.2.4&quot;,
      &quot;prando&quot;: &quot;^6.0.1&quot;,
      &quot;rxjs&quot;: &quot;~6.6.0&quot;,
      &quot;tslib&quot;: &quot;^2.1.0&quot;,
      &quot;zone.js&quot;: &quot;~0.11.4&quot;
    },
    &quot;devDependencies&quot;: {
      &quot;@angular-devkit/build-angular&quot;: &quot;~12.0.1&quot;,
      &quot;@angular/cli&quot;: &quot;~12.0.1&quot;,
      &quot;@angular/compiler-cli&quot;: &quot;~12.0.1&quot;,
      &quot;@types/jasmine&quot;: &quot;~3.6.0&quot;,
      &quot;@types/node&quot;: &quot;^12.11.1&quot;,
      &quot;jasmine-core&quot;: &quot;~3.7.0&quot;,
      &quot;karma&quot;: &quot;~6.3.0&quot;,
      &quot;karma-chrome-launcher&quot;: &quot;~3.1.0&quot;,
      &quot;karma-coverage&quot;: &quot;~2.0.3&quot;,
      &quot;karma-jasmine&quot;: &quot;~4.0.0&quot;,
      &quot;karma-jasmine-html-reporter&quot;: &quot;^1.5.0&quot;,
      &quot;typescript&quot;: &quot;~4.2.3&quot;
    },
    &quot;scripts&quot;: {
      &quot;ng&quot;: &quot;ng&quot;,
      &quot;start&quot;: &quot;ng serve&quot;,
      &quot;build&quot;: &quot;ng build&quot;,
      &quot;watch&quot;: &quot;ng build --watch --configuration development&quot;,
      &quot;test&quot;: &quot;ng test&quot;
    }
  }
  </code></pre>
  <p>I've tried deleting the <code>node_modules</code> directory and running <code>npm install</code></p>
  <p>Search the web about this error seems to suggest that this is a <code>webpack</code> issue... Based upon these conversations I'm not sure how to get this working again.</p>
  <p>Should I switch to <code>aws-sdk-js</code> even though <code>aws-sdk</code> was working up and until today?</p>
  <p>Suggestions regarding how to resolve this issue sought</p>
  <p>Thanks!</p>