Skip to content

Buffer is not defined #33

@ramila

Description

@ramila

we recently upgraded our application to angular 6 and RxJs 6. Now I get the following error when trying to encode/decode

Uncaught ReferenceError: Buffer is not defined
at encode (base64url.js:5)
at Observable._zoneSubscribe (file-upload-service.ts:160)
at Observable.push../node_modules/rxjs/_esm5/internal/Observable.js.Observable.subscribe [as __zone_symbol__subscribe] (Observable.js:161)
at Observable.value [as subscribe] (zone-patch-rxjs.js:95)
at CatchOperator.push../node_modules/rxjs/_esm5/internal/operators/catchError.js.CatchOperator.call (catchError.js:17)
at Observable.push../node_modules/rxjs/_esm5/internal/Observable.js.Observable.subscribe [as __zone_symbol__subscribe] (Observable.js:158)
at Observable.value [as subscribe] (zone-patch-rxjs.js:95)
at subscribeTo.js:21
at subscribeToResult (subscribeToResult.js:6)
at MergeMapSubscriber.push../node_modules/rxjs/_esm5/internal/operators/mergeMap.js.MergeMapSubscriber._innerSub (mergeMap.js:127)

I'm using base64url 3.0.0 with typescript. I also needed to manually add the following to your package.json to get it to work with noImpliciteany set to true.

"typings": "./dist/base64url.d.ts"

this issue has already been reported (#29)

regards
Ramila

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions