Getting error, cannot access "stream.readable" when trying to upgrade node version of a project that uses xlsx package
gvg356 opened this issue · comments
The error is: uncaught error: module "stream" has been externalized for browser compatibility. cannot access "stream.readable" in client code.
vitejs/vite#5963 suggests Vite is at fault.
Over the years, a number of settings have been added to package.json
to satiate Webpack. Vite has its own required settings . After adding import maps #2744 (thanks @BrianHung ) Vite understands the library.
We tested 0.18.10 in a small Vite project https://docs.sheetjs.com/docs/getting-started/demos/bundler#vite , so upgrading is the recommended option.