-
Notifications
You must be signed in to change notification settings - Fork 145
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cannot read property 'crypto' of undefined #81
Comments
Same here. |
I have a feeling that this is Angular 8 problem, I started getting this as well after upgrade. |
Has anyone found a solution to this issue? |
Same - updated from Angular 6 to 8 and now have this issue. Update: See this here for some explanation. Angular is preventing this from working, as its not a web standard yet |
Closing this issue, as it seems to have been fixed in 2.0.1. |
Hey guys,
I'm getting a
error in my Angular/Node.js project written in TypeScript. I looked in object_hash.js:1 and my guess would be it's coming from the line
r.crypto&&crypto.getRandomValues
I'm totally new to Angular and Node and have no idea how to handle this. I've "npm install"-ed both object-hash and @types/object-hash. I've uninstalled and reinstalled. No luck.
When I open a new folder somewhere else and just try
hash( [1, 'hello world'], { algorithm: 'sha512' })
and logging it to the console, it seems to work just fine. There's no problem in my project until it hits the lineconsole.log(hash([string1, string2], { algorithm: 'sha512' }));
Any help here?I should also mention that in a previous non-Angular project, it all worked just fine. I had at the top
import hash from 'object-hash';
, but now I've had toimport * as hash from 'object-hash';
due to aerror. Please help! This might be a super-simple fix, but I have no idea how to fix this.
The text was updated successfully, but these errors were encountered: