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
Add "type": "module" in your package.json file. zip.js was not designed for Node.js. It just turned out that as time passed, Node.js became more and more compatible with zip.js. That is why it does not offer CommonJS support.
When import zip.js in Typescript project.
import { ZipReader, ZipWriter } from '@zip.js/zip.js';
Error [ERR_REQUIRE_ESM]: Must use import to load ES Module: \node_modules@zip.js\zip.js\index.js
require() of ES modules is not supported.
Can we support the commonjs module as well?
The text was updated successfully, but these errors were encountered: