sindresorhus/open

[ERR_REQUIRE_ESM]: require() of ES Module

Closed this issue · 2 comments

Hello I have this issue when I upgrade open to the latest version that I didnt have before:

  • I am using an electron app

[ERR_REQUIRE_ESM]: require() of ES Module [...path]\node_modules\open\index.js from [component]\internal-window.js not supported

Any idea?

Thank you

Warning: This package is native ESM and no longer provides a CommonJS export. If your project uses CommonJS, you will have to convert to ESM or use the dynamic import() function. Please don't open issues for questions regarding CommonJS / ESM.

I also faced this issue.
Downgrading to 8.4.2 could simply resolved it.

  "dependencies": {
       :
    "open": "^8.4.2",
       :
  }