Closed blue-predator closed 1 year ago
I am getting the same issue, buffer is not defined.
it should normally be fixed by:
new webpack.ProvidePlugin({
Buffer: ['buffer', 'Buffer'],
}),
config.resolve.fallback = {
buffer: require.resolve('buffer/'),
}
I fixed it by adding:
import buffer from 'buffer';
(window as any).Buffer = buffer.Buffer;
in polyfills.ts which is imported in index.html
This was enough to make it work, but it has similar node issues to the ones found in escpos
, which has more advanced functions so I am switching back to that
While testing this out I get: Error: Failed to execute 'open' on 'USBDevice': Access denied.
Worked around this by installing the Zadig USB driver, but then I get: ReferenceError: Buffer is not defined