-
Notifications
You must be signed in to change notification settings - Fork 57
ReferenceError: Buffer is not defined #99
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
Comments
Hi @otto2me, are you running the application on Node.JS, or is it designed to work in a browser? If for NodeJS, please tell me the version. |
Hi, I try to use it with the latest electron package, my setup is: |
Thanks! I will deploy the same environment and try to reproduce |
Ok, using electron I have to setup inside electron/main.js the following: Now it works. |
Seems to be a problem after all, since I had planned to support browsers. I looked at how it worked with angular and was pretty frustrated. So I plan to solve this problem after all |
Hi,
I like to use jira.js and have addit it to my project. However, I run into problems when I try to login to jira, by getting the below buffer error:
error userlogin ReferenceError: Buffer is not defined
at Object.getAuthentication (index.js:35)
at Client. (index.js:172)
at step (index.js:55)
at Object.next (index.js:36)
at index.js:30
at new ZoneAwarePromise (zone-mix.js:913)
at push.32ji.__awaiter (index.js:26)
at Client.sendRequest (index.js:166)
at Myself. (myself.js:151)
at step (myself.js:44)
I setup my conection like this:
The issue seems to be in node_modules\jira.js\out\helpers\index.js where the buffer cannot be used:
return "Basic " + Buffer.from(username + ":" + (apiToken || password)).toString('base64');
Any idea what I can do?
Without success I tried inside polyfills.ts:
(window as any)['global'] = window;
global.Buffer = global.Buffer || require('buffer').Buffer;
thx
The text was updated successfully, but these errors were encountered: