question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

jszip is not a constructor

See original GitHub issue

when i use “xlsx”: “^0.15.6”,get TypeError: jszip is not a constructor at zip_read (xlsx.js:2867) at read_zip (xlsx.js:20706) at Object.readSync [as read] (xlsx.js:20773) at FileReader.fileReader.onload (import.js:80) use
" import * as XLSX from ‘xlsx’ " to import xlsx how can i repair it?

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:8 (2 by maintainers)

github_iconTop GitHub Comments

3reactions
satyapraffulcommented, Jul 8, 2021

Not sure if this is the right solution, but https://stackoverflow.com/questions/64557638/how-to-polyfill-node-core-modules-in-webpack-5 the second approach using the node polyfill plugin worked for me.

1reaction
ThePainnncommented, Jul 9, 2021

Nice thanks a lot! the node-polyfill-webpack-plugin did the trick:

const NodePolyfillPlugin = require("node-polyfill-webpack-plugin")
module.exports = {
    plugins: [
        new NodePolyfillPlugin()
    ]
}
Read more comments on GitHub >

github_iconTop Results From Across the Web

Uncaught TypeError: jszip is not a constructor #872 - GitHub
Hi, i am trying to extract xlsx file data in a sap ui5 application and i have included two files : " xlsx.js"...
Read more >
SAPUI5 Uncaught TypeError: jszip is not a constructor
SAPUI5 Uncaught TypeError: jszip is not a constructor ; read_zip(data, opts) { var ; var o = opts||{}; if(!o. · type ; type...
Read more >
JSZip is not a constructor - ParamQuery
Hi, I am evaluating your product and when importing an xlsx I get the following error: "JSZip is not a constructor"
Read more >
Unable to export dxDataGrid - JSZip is not a constructor
When I try to export a dxDataGrid I'm getting this javascript exception: "TypeError: JSZip is not a constructor".
Read more >
TypeError: "x" is not a constructor - JavaScript - MDN Web Docs
The JavaScript exception "is not a constructor" occurs when there was an attempt to use an object or a variable as a constructor,...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found