How do I import node crypto into my Angular 11 components?

Viewed 896

I'm trying to implement a blockchain system in my angular application. And I've created a typescript file with the class implementation and crypto import statement.

import * as crypto from 'crypto';

class Blockchain {//blockchain code here}

However when I import this class into my angular components. I get this compile-time error 'Module not found: Error: Can't resolve 'crypto' in '...'';

I'm using Angular 12 node v16.3.0 typescript v4.1.5

Thank you in advance

1 Answers
Related