Closed CYscared closed 6 months ago
The error "Uncaught (in promise) ReferenceError: Buffer is not defined" occurs when trying to retrieve TRC20 token balances using TronWeb in Vue or React.
TronWeb requires Buffer to work. You should provide a global Buffer variable. You can install buffer and add it to your project.
Buffer
buffer
import { Buffer } from 'buffer/'; globalThis.Buffer = Buffer;
The error "Uncaught (in promise) ReferenceError: Buffer is not defined" occurs when trying to retrieve TRC20 token balances using TronWeb in Vue or React.