Error [ERR_REQUIRE_ESM]: require() of ES Module not supported. #5723
-
如图,使用hexo install的时候,报错:
Error [ERR_REQUIRE_ESM]: require() of ES Module D:\HexoBlogFile\node_modules\.pnpm\[email protected]\node_modules\strip-ansi\index.js from D:\HexoBlogFile\node_modules\.pnpm\[email protected][email protected]\node_modules\hexo\dist\plugins\console\list\common.js not supported.
意思是hexo的代码中使用了require来导入依赖?导致这些依赖无法正常加载,但我看了源码,用的都是import啊?
|
Beta Was this translation helpful? Give feedback.
Answered by
stevenjoezhang
Nov 10, 2025
Replies: 2 comments 2 replies
-
|
node版本太低 |
Beta Was this translation helpful? Give feedback.
1 reply
-
|
升级到 Nodejs 24 试试 |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
stevenjoezhang
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment

升级到 Nodejs 24 试试