Open Jille opened 3 years ago
ReferenceError: Buffer is not defined at eval (webpack-internal:///./node_modules/twirp-rpc-client/dist/protobuf-client.js:37:13)
return this.axiosClient .post(`/${service}/${method}`, data) .then((response) => { return Buffer ? Buffer.from(response.data) : new Uint8Array(response.data); })
I'm not a javascript expert, so I don't understand why it chokes on that.
I'm using this with Vue3. Maybe that enables some strict mode that breaks this?
Worked around this by adding:
// eslint-disable-next-line @typescript-eslint/no-explicit-any (window as any).Buffer = undefined;
to our main.ts.
main.ts
I'm not a javascript expert, so I don't understand why it chokes on that.
I'm using this with Vue3. Maybe that enables some strict mode that breaks this?