#[ExcelJs] Cannot find module 'stream' or its corresponding type declarations

5 messages · Page 1 of 1 (latest)

stark plinth
#

I am trying to use exceljs package in Angular 15 project, however I got this error

Error: node_modules/exceljs/index.d.ts:2003:18 - error TS2307: Cannot find module 'stream' or its corresponding type declarations.

So, does this mean that I can not use exceljs in my Angular project? I want to use this to generate xlsx with some cell formatting. Or, do you have any alternative to exceljs?

tepid lava
#

It's a NodeJS library. It's not designed to be used in the browser, where Angular apps run, but on the server, with NodeJS.

stark plinth
tepid lava
#

Apparently it is, since it publishes a browserified version. See https://www.npmjs.com/package/exceljs#contents and search for Browserify. But I still think you'd better make your frontend simpler and let the backend deal with that.

stark plinth