dai.js icon indicating copy to clipboard operation
dai.js copied to clipboard

Cannot use with Angular, but can with Vue

Open the-fool opened this issue 3 years ago • 0 comments

It's odd - when I

import Maker from "@makerdao/dai"

in Vue, everything works fine in the browser. When I do so with Angular 11, I get a whole host of unresolved module errors. The list includes crypto, os, stream, and so forth.

Error: ./node_modules/web3-eth-accounts/src/index.js
Module not found: Error: Can't resolve 'crypto' in . . . 

Is the dai.js module not packaged in a way that Angular's compiler can read it?

the-fool avatar May 05 '21 23:05 the-fool