unplugin / unplugin-turbo-console

🚀 Improve the Developer Experience of console
https://utc.yuy1n.io
MIT License
526 stars 12 forks source link

报错 Error [ERR_REQUIRE_ESM]: require() of ES Module Instead change the require of #49

Open long36708 opened 5 days ago

long36708 commented 5 days ago

Describe the bug

require('unplugin-turbo-console/webpack').default({ extendedPathFileNames: ['index'] }), 这样写报错 Error [ERR_REQUIRE_ESM]: require() of ES Module Instead change the require of

定位到是 h3包依赖的 crossws升级导致的不兼容 commonjs,临时解决锁定版本 crossws@^0.2.4

Reproduction

tt

System Info

System:
    OS: Windows 11 10.0.26100
    CPU: (16) x64 AMD Ryzen 7 PRO 4750U with Radeon Graphics
    Memory: 23.85 GB / 47.33 GB
  Binaries:
    Node: 18.20.0 - D:\dev\nodejs\node.EXE
    Yarn: 1.22.19 - D:\dev\nvm\node_global\yarn.CMD
    npm: 10.5.0 - D:\dev\nodejs\npm.CMD
    pnpm: 8.15.5 - D:\dev\nvm\node_global\pnpm.CMD
  Browsers:
    Edge: Chromium (125.0.2535.67)
    Internet Explorer: 11.0.26100.1

Used Package Manager

yarn

Validations