Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

require() of ES Module /get-stream/source/index.js from /extract-zip/index.js not supported. #143

Open
xonaman opened this issue Aug 31, 2024 · 2 comments

Comments

@xonaman
Copy link

xonaman commented Aug 31, 2024

Hey, I am receiving the following error when working with @sparticuz/chromium, and it seems to come from extract-zip^2.0.1.

{
  "errorType": "Error",
  "errorMessage": "require() of ES Module /opt/node_modules/get-stream/source/index.js from /opt/node_modules/extract-zip/index.js not supported.\nInstead change the require of /opt/node_modules/get-stream/source/index.js in /opt/node_modules/extract-zip/index.js to a dynamic import() which is available in all CommonJS modules.",
  "trace": [
    "Error [ERR_REQUIRE_ESM]: require() of ES Module /opt/node_modules/get-stream/source/index.js from /opt/node_modules/extract-zip/index.js not supported.",
    "Instead change the require of /opt/node_modules/get-stream/source/index.js in /opt/node_modules/extract-zip/index.js to a dynamic import() which is available in all CommonJS modules.",
    "    at Object.<anonymous> (/opt/node_modules/extract-zip/index.js:4:19)"
  ]
}

Does that belong to the chromium or puppeteer repos or does that belong here?

@ibnumalik99
Copy link

Hi, I have a similar problem. Can I get a solution for this problem here?

@xonaman
Copy link
Author

xonaman commented Sep 23, 2024

@ibnumalik99 this is my current workaround (package.json):

{
  "overrides": {
    "get-stream": "6.0.1"
  }
}

Because get-stream was not an ESM module back then at version 6.0.1.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants