Can't resolve 'crypto' (Angular 6)
See original GitHub issueGeneral information
- SDK version: 3.33.0
- Environment: Sandbox and Production (Angular)
- Browser and OS: All
Issue description
When trying to build an angular 6 application that uses braintree-web it will print out the following warning.
WARNING in ./node_modules/braintree-web/data-collector/vendor/sjcl.js
Module not found: Error: Can't resolve 'crypto' in '/REDACTED/node_modules/braintree-web/data-collector/vendor'
Angular 6 removed the shims to support non browser (node) libraries. What can be done in this case?
Issue Analytics
- State:
- Created 5 years ago
- Comments:15 (9 by maintainers)
Top Results From Across the Web
Module not found: Error: Can't resolve 'crypto' - Stack Overflow
I ran into a similar issue lately while trying to use another library (tiff.js) in a small project I was experimenting with.
Read more >Angular error during compilation - Can't resolve 'crypto' #17
Hello, I am running Angular and requiring 'snarkjs' library. ... The problem comes from line 35 of that file (zqfield.js). It tries to...
Read more >Module not found: Error: Can't resolve 'crypto' [Solved]
To solve the "Module not found: Error: Can't resolve 'crypto'" error, set the browser.crypto property to false in your package.json file or include...
Read more >JavaScript : Module not found: Error: Can't resolve 'crypto'
JavaScript : Module not found: Error: Can't resolve ' crypto ' [ Gift : Animated Search Engine : https://bit.ly/AnimSearch ] JavaScript ...
Read more >Can't resolve 'crypto' in node_modules/bson/dist react
I'm using realm-web on my react app to build a simple task reminder app. But, when I start/build the app it is giving...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
v3.36.0 on npm includes a
browser
property in the package.json that points to a browserified version of the file. Webpack should use this path instead and this should fix the issues with Angular 6. Please update and comment here if you’re still having issues.I think I’ve found a solution for this. Will keep y’all updated.