chromium icon indicating copy to clipboard operation
chromium copied to clipboard

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

Open xonaman opened this issue 1 year ago • 0 comments

Hey, I am receiving the following error when working with chromium.

{
  "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)"
  ]
}

I don't know if that comes from chromium or puppeteer.

I was using @sparticuz/chromium^122.0.0 and puppeteer-core^22.5.0 which worked perfectly fine until now. Probably some dependency, get-stream or extract-zip had an update.

I tried upgrading to @sparticuz/chromium^127.0.0 and puppeteer-core^23.2.1 but got the exact same error.

Can someone please point me in the right direction?

xonaman avatar Aug 31 '24 16:08 xonaman