You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, I've created a plain electron app using electron-forge and its typescript & webpack template. When calling XLSX.read in the renderer.ts, the following error is thrown, leading to this line in jszip.js. Package versions can be seen in the package.json below.
ReferenceError
Uncaught ReferenceError: require is not defined
at e (jszip.js:26)
at jszip.js:26
at jszip.js:1
at Object../node_modules/xlsx/jszip.js (jszip.js:1)
at __webpack_require__ (bootstrap:789)
at fn (bootstrap:100)
at make_xlsx_lib (xlsx.js:2960)
at Object../node_modules/xlsx/xlsx.js (xlsx.js:21698)
at __webpack_require__ (bootstrap:789)
at fn (bootstrap:100)
Did anyone of you already encounter this issue, I guess that's a quite standard setup with webpack & typescript.
Do you have any Idea what's going on here and how to fix that, any help is appreciated!
The text was updated successfully, but these errors were encountered:
@aplr I have the same error, I try to start reading xlsx.ReadFile/read or via fs in the react function , but it gives the same error. Were you able to solve the problem?
@simplecommerce please raise a new issue with more details (like a small project so we can reproduce the issue).
@KomodoodreadFile cannot be used in a browser context since it uses th e nodejs fs module under the hood. Please raise a new issue with more details so we can reproduce.
Hi, I've created a plain electron app using electron-forge and its typescript & webpack template. When calling
XLSX.read
in therenderer.ts
, the following error is thrown, leading to this line injszip.js
. Package versions can be seen in thepackage.json
below.ReferenceError
package.json
Did anyone of you already encounter this issue, I guess that's a quite standard setup with webpack & typescript.
Do you have any Idea what's going on here and how to fix that, any help is appreciated!
The text was updated successfully, but these errors were encountered: