Skip to content
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

Doesnt work with Angular 7 still getting buffer is not defined #44

Open
Gabb1995 opened this issue Apr 9, 2019 · 3 comments
Open

Doesnt work with Angular 7 still getting buffer is not defined #44

Gabb1995 opened this issue Apr 9, 2019 · 3 comments

Comments

@Gabb1995
Copy link

Gabb1995 commented Apr 9, 2019

Doesnt work with Angular 7 still getting buffer is not defined, can someone else confirm?

Originally posted by @Gabb1995 in #33 (comment)

Package.json

    "@angular/animations": "^7.1.4",
    "@angular/cdk": "^7.3.2",
    "@angular/common": "~7.1.0",
    "@angular/compiler": "~7.1.0",
    "@angular/core": "~7.1.0",
    "@angular/flex-layout": "^7.0.0-beta.23",
    "@angular/forms": "~7.1.0",
    "@angular/material": "^7.3.2",
    "@angular/platform-browser": "~7.1.0",
    "@angular/platform-browser-dynamic": "~7.1.0",
    "@angular/router": "~7.1.0",
    "@fortawesome/fontawesome-free": "^5.7.2",
    "@ngx-translate/core": "^11.0.1",
    "@ngx-translate/http-loader": "^4.0.0",
    "base64url": "^3.0.1",
    "core-js": "^2.5.4",
    "dayjs": "^1.8.11",
    "hammerjs": "^2.0.8",
    "lodash": "^4.17.11",
    "ngx-color-picker": "^7.3.1",
    "ngx-openlayers": "^0.8.22",
    "rxjs": "^6.3.3",
    "tslib": "^1.9.0",
    "zone.js": "~0.8.26"

ReferenceError: "Buffer is not defined"
    decode base64url.js:14
    getConfigFromLegacy whitelabel.service.ts:294
    load whitelabel.service.ts:45
    ZoneAwarePromise Angular
    load whitelabel.service.ts:44
    ngOnInit app.component.ts:74
    RxJS 3
app.component.ts:80:32
    ngOnInit app.component.ts:80
    Angular 10
@MylesBorins
Copy link
Collaborator

Can you make a minimal reproduction? A very small project that can recreate the error? If you can put that together it will be much easier to fix

@Gabb1995
Copy link
Author

Gabb1995 commented Apr 9, 2019

@remoe
Copy link

remoe commented Apr 22, 2019

The browser doesn't support "Buffer". One need to add Buffer polyfill. On WebPack one can enable it with "Buffer: true":

https://webpack.js.org/configuration/node/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants