browserify / sha.js

Streamable SHA hashes in pure javascript
Other
288 stars 60 forks source link

Angular 6 #58

Closed JarekSour closed 5 years ago

JarekSour commented 6 years ago

Any idea how fix the compability??

ReferenceError: global is not defined at Object../node_modules/buffer/index.js

dcousens commented 5 years ago

Wrong repository

Tzahi12345 commented 3 years ago

Is it the wrong repo? I'm getting the same error:

zone-evergreen.js:659 Unhandled Promise rejection: global is not defined ; Zone: <root> ; Task: Promise.then ; Value: ReferenceError: global is not defined
    at Object.tjlA (index.js:43)
    at __webpack_require__ (bootstrap:84)
    at Object.hwdV (index.js:2)
    at __webpack_require__ (bootstrap:84)
    at Object.tnIz (hash.js:1)
    at __webpack_require__ (bootstrap:84)
    at Object.CH9F (sha.js:10)
    at __webpack_require__ (bootstrap:84)
    at Object.afKu (index.js:10)
    at __webpack_require__ (bootstrap:84) ReferenceError: global is not defined
    at Object.tjlA (http://localhost:4200/app-app-module.js:73268:30)
    at __webpack_require__ (http://localhost:4200/runtime.js:85:30)
    at Object.hwdV (http://localhost:4200/app-app-module.js:59522:14)
    at __webpack_require__ (http://localhost:4200/runtime.js:85:30)
    at Object.tnIz (http://localhost:4200/app-app-module.js:77223:14)
    at __webpack_require__ (http://localhost:4200/runtime.js:85:30)
    at Object.CH9F (http://localhost:4200/app-app-module.js:27664:12)
    at __webpack_require__ (http://localhost:4200/runtime.js:85:30)
    at Object.afKu (http://localhost:4200/app-app-module.js:49737:15)
    at __webpack_require__ (http://localhost:4200/runtime.js:85:30)

This is on Angular 11, there is a working example though for Angular 7.

dcousens commented 3 years ago

I'd probably check feross/buffer, https://github.com/feross/buffer/issues/175, https://github.com/feross/buffer/issues/235, et cetera