react native t.buffer is not a function
See original GitHub issueHi,
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:
- Created 6 years ago
- Reactions:3
- Comments:5 (4 by maintainers)
Top 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 >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Cormander, does this solve your issue:
https://github.com/dropbox/dropbox-sdk-js/pull/173/files#diff-2b4ca49d4bb0a774c4d4c1672d7aa781
https://github.com/dropbox/dropbox-sdk-js/pull/173
The original
t.buffer is not a function
issue should be fixed in the latest version of the library, currently v4.0.3.