Parametricos / BCF.js

bcf-js is a BIM Collaboration Format (BCF) reader & parser developed and maintained by Parametricos Ltd.
Mozilla Public License 2.0
32 stars 10 forks source link

Only for Node? #6

Open aurelien-boubennec opened 2 months ago

aurelien-boubennec commented 2 months ago

Hi,

I am getting the following error when writing a BCF to a buffer:

Error: nodebuffer is not supported by this platform at a.checkSupport (jszip.min.js:13:34660) at new f (jszip.min.js:13:27424) at n.generateInternalStream (jszip.min.js:13:17366) at n.generateAsync (jszip.min.js:13:17444) at exportZip (BcfWriter.ts:78:22) at BcfWriter.write (BcfWriter.ts:30:26) at ExportToBcf (BcfFunctions.ts:46:37) at onClick (ExportPage.tsx:26:27)

Does that mean it won't work in the browser? Thanks

harrycollin commented 1 month ago

The error appears to be related to jszip. This is supported in the browser however for some reason it's trying to use Buffer which is Node only. Can you give more details about your environment & bundler?

This issue on JSZip looks similar: https://github.com/Stuk/jszip/issues/821