question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

react native t.buffer is not a function

See original GitHub issue

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.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:3
  • Comments:5 (4 by maintainers)

github_iconTop GitHub Comments

0reactions
greg-dbcommented, 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.

Read more comments on GitHub >

github_iconTop Results From Across the Web

NodeJS: TypeError: Buffer is not a function (but it's a function!)
Reading your console output, the return value of require("buffer") is not a function. Instead, it's an object that has two methods: Buffer ......
Read more >
Buffer | Node.js v19.3.0 Documentation
While the Buffer class is available within the global scope, it is still recommended to explicitly reference it via an import or require...
Read more >
Node.js Buffer.from() Method - W3Schools
The Buffer.from() method creates a new buffer filled with the specified string, array, or buffer. Syntax. Buffer.from(obj, encoding); ...
Read more >
Creating buffers using JSTS + ES6 modules not working
I'm answering my own question as I found a solution. I wrote to the JSTS dev list asking about this issue and they...
Read more >
Troubleshooting | React Navigation
This and some similar errors might occur if you have a bare React Native project and the library react-native-gesture-handler library isn't linked.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found