Is it supposed to work with Angular?
Moulisse opened this issue · 1 comments
Moulisse commented
I would like to use your lib in my Angular project but I have an error :
core.js:6014 ERROR Error: Uncaught (in promise): ReferenceError: global is not defined
ReferenceError: global is not defined
at Object../node_modules/buffer/index.js (index.js:43)
at __webpack_require__ (bootstrap:84)
at Object../node_modules/safe-buffer/index.js (index.js:2)
at __webpack_require__ (bootstrap:84)
at Object../node_modules/randombytes/browser.js (browser.js:15)
at __webpack_require__ (bootstrap:84)
at Object../node_modules/crypto-browserify/index.js (index.js:3)
at __webpack_require__ (bootstrap:84)
at webpackUniversalModuleDefinition (kdbxweb.js:4)
at Object../node_modules/kdbxweb/dist/kdbxweb.js (kdbxweb.js:11)
at resolvePromise (zone-evergreen.js:797)
at resolvePromise (zone-evergreen.js:754)
at zone-evergreen.js:858
at ZoneDelegate.invokeTask (zone-evergreen.js:391)
at Object.onInvokeTask (core.js:39680)
at ZoneDelegate.invokeTask (zone-evergreen.js:390)
at Zone.runTask (zone-evergreen.js:168)
at drainMicroTaskQueue (zone-evergreen.js:559)
What I did was :
- npm i kdbxweb
- import it
- console.log(kdbxweb)
Even with a freshly started project I still have it.
antelle commented
It should work with Angular, I don't see a reason why it can't.
I guess, you need to configure webpack to make it work, it's doing something weird in your case.