-
Notifications
You must be signed in to change notification settings - Fork 11
Closed
Description
Great library!
For some reason, today ng-qrcode failed with a big fat error.
Uncaught ReferenceError: global is not defined
at Object.../../node_modules/node-libs-browser/node_modules/buffer/index.js (index.js:43)
at __webpack_require__ (bootstrap:79)
at Object.../../node_modules/qrcode/lib/core/reed-solomon-encoder.js (reed-solomon-encoder.js:3)
at __webpack_require__ (bootstrap:79)
at Object.../../node_modules/qrcode/lib/core/qrcode.js (qrcode.js:10)
at __webpack_require__ (bootstrap:79)
at Object.../../node_modules/qrcode/lib/browser.js (browser.js:4)
at __webpack_require__ (bootstrap:79)
at Module.../../node_modules/ng-qrcode/fesm2015/ng-qrcode.js (ng-qrcode.js:1)
I did some Googling and found:
global is not available as of Angular 6.
Library authors should not depend on this property. See this post: angular/angular-cli#9827 (comment)
As a workaround for now, I am putting this is my polyfills.ts
(window as any).global = window;
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels