Ian
Ian

Reputation: 2620

Module not found: Error: Can't resolve 'util' in `node_modules/aws-sdk/lib` using React.JS

I am following this tutorial for using DynamoDB with React.JS but I get an error that the aws-sdk library can't resolve util.

It is a node package so I shouldn't actually change its code.

Upvotes: 0

Views: 2709

Answers (1)

Ian
Ian

Reputation: 2620

I found an answer when using it for Angular here. It also works fine for React.js.

Just install the util package: yarn add util.

The aws-sdk package should have this included in its package file as a dependency.

Upvotes: 1

Related Questions