foxglove/create-foxglove-extension

ReferenceError: Buffer is not defined

schmogmog opened this issue · 2 comments

Hello,
I tried to make an extension, which read csv files and used therefore the packages fs and csv-parse. At first I had problems with using the fs package, but after updating to the newest foxglove version it works. The installation process of the extension was successful, but when I start Foxglove it tolds me that my extension is unknown and in the Developer Tools appears the error Buffer is not defined.

  • Foxglove Version: 1.21.0
  • create-foxglove-extension: 0.6.0

grafik

Extensions run in the browser, so they do not have access to APIs like fs and Buffer. In #70 we configured webpack so it doesn't crash when fs is imported, but actually using fs will not work. We could provide a polyfill for Buffer as well, but you will probably have better luck if you use packages which are intended to work in the browser.

Thanks for the clarification, then I have to find other packages. 👍