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

react native t.buffer is not a function #178

Closed
cormander opened this issue Feb 17, 2018 · 5 comments
Closed

react native t.buffer is not a function #178

cormander opened this issue Feb 17, 2018 · 5 comments

Comments

@cormander
Copy link

Hi,

I'm using this module in a react native environment. All seems to work well, except when I attempt to download a file with dbx.filesDownload - I get the following exception:

TypeError: t.buffer is not a function. (In 't.buffer()'; 't.buffer' is undefined)

My fix hack for this is to replace the one and only call to buffer() with text() in the dependency:

perl -pi -e 's/t\.buffer/t.text/' node_modules/dropbox/dist/Dropbox-sdk.min.js

Not sure what the "proper" fix for this is, but figured I'd let you know my workaround. Thanks.

@greg-db
Copy link
Contributor

greg-db commented Feb 20, 2018

Thanks for writing this up! I'll send this along to the team see if we can get proper support for this in the future.

@mkirkland4874
Copy link
Contributor

mkirkland4874 commented Feb 21, 2018

Cormander, does this solve your issue:

https://github.com/dropbox/dropbox-sdk-js/pull/173/files#diff-2b4ca49d4bb0a774c4d4c1672d7aa781

#173

@Wifsimster
Copy link

Hi, i have the same problem on a vue component (not on react).

dbx.filesDownload({ path: file.path }) is working well in 2.5.13 but not in superior version.

@greg-db
Copy link
Contributor

greg-db commented Mar 2, 2018

@Wifsimster This may depend on how you're including the library. Please review #172 for more information and a potential workaround.

@greg-db
Copy link
Contributor

greg-db commented Apr 17, 2018

The original t.buffer is not a function issue should be fixed in the latest version of the library, currently v4.0.3.

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

4 participants