Using this library in bids-validator via Deno, we have run into this issue when importing recent builds of nifti-reader-js:
This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.
The cause of this seems to be how browserify is shimming buffer, producing a build that triggers this error because of the different global namespace in Deno (even though Deno does provide Uint8Array).
Switching to esbuild solves this issue but may have some implications for other users of the library.
Using this library in bids-validator via Deno, we have run into this issue when importing recent builds of nifti-reader-js:
This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.
The cause of this seems to be how browserify is shimming buffer, producing a build that triggers this error because of the different global namespace in Deno (even though Deno does provide Uint8Array).
Switching to esbuild solves this issue but may have some implications for other users of the library.