node-archiver icon indicating copy to clipboard operation
node-archiver copied to clipboard

Class extends value undefined is not a constructor or null

Open maifeeulasad opened this issue 2 years ago • 2 comments

I get this error on import with archiver Stack-trace:

Uncaught TypeError: Class extends value undefined is not a constructor or null
    at node_modules/readdir-glob/index.js (index.js:120:1)
    at __require (chunk-J43GMYXM.js?v=5acb6c3b:11:50)
    at node_modules/archiver/lib/core.js (core.js:9:12)
    at __require (chunk-J43GMYXM.js?v=5acb6c3b:11:50)
    at node_modules/archiver/index.js (index.js:8:16)
    at __require (chunk-J43GMYXM.js?v=5acb6c3b:11:50)
    at node_modules/to-spreadsheet/lib/generate-excel.js (generate-excel.js:16:18)
    at __require (chunk-J43GMYXM.js?v=5acb6c3b:11:50)
    at node_modules/to-spreadsheet/lib/index.js (index.js:4:26)
    at __require (chunk-J43GMYXM.js?v=5acb6c3b:11:50)

This works fine on CLI based node project. But when I try to call generateExcel method from to-spreadsheet I get this error. This library is using archiver under the hood.

How can I resolve this issue?

maifeeulasad avatar Sep 22 '23 15:09 maifeeulasad

Hi,

Same error here, on a Nuxt3 project while trying to simply import archiver in a component. Tried both : import { archiver } as 'archiver' and import * as archiver from 'archiver'

But none seem to work.

Nitroxone avatar Jan 19 '24 09:01 Nitroxone