You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I encountered an issue while using the @xmtp/xmtp-js package in a React application running in the browser. The error message is ReferenceError: Buffer is not defined.
It seems that the package is trying to use Node.js's Buffer object, which is not available in the browser environment. This causes the application to crash.
Here's the error stack trace for reference:
Buffer is not defined
ReferenceError: Buffer is not defined
at ./node_modules/@xmtp/xmtp-js/dist/web/index.js (http://localhost:3000/static/js/bundle.js:94369:8)
at options.factory (http://localhost:3000/static/js/bundle.js:108687:31)
at __webpack_require__ (http://localhost:3000/static/js/bundle.js:108097:33)
at fn (http://localhost:3000/static/js/bundle.js:108344:21)
at ./src/FloatingInbox/index.js (http://localhost:3000/static/js/bundle.js:1355:71)
at options.factory (http://localhost:3000/static/js/bundle.js:108687:31)
at __webpack_require__ (http://localhost:3000/static/js/bundle.js:108097:33)
at fn (http://localhost:3000/static/js/bundle.js:108344:21)
at ./src/Page.js (http://localhost:3000/static/js/bundle.js:1765:72)
at options.factory (http://localhost:3000/static/js/bundle.js:108687:31)
The text was updated successfully, but these errors were encountered:
Describe the bug
Hello,
I encountered an issue while using the
@xmtp/xmtp-js
package in a React application running in the browser. The error message isReferenceError: Buffer is not defined
.It seems that the package is trying to use Node.js's
Buffer
object, which is not available in the browser environment. This causes the application to crash.Here's the error stack trace for reference:
The text was updated successfully, but these errors were encountered: