Cannot find module 'node:async_hooks'
3条回答 默认 最新
阿里嘎多学长 2025-04-08 14:31关注阿里嘎多学长整理AIGC生成,因移动端显示问题导致当前答案未能完全显示,请使用PC端查看更加详细的解答过程
问题解决方案
nrm ls报错Cannot find module 'node:async_hooks',可能是因为 Node.js 版本问题。解决方法:
- 检查 Node.js 版本是否支持
async_hooks模块。如果你的 Node.js 版本低于 8.5.0,可能会出现这个问题。 - 如果你的 Node.js 版本支持
async_hooks模块,但是仍然出现这个问题,可以尝试使用以下命令:
nrm ls --no-async这将禁用
async_hooks模块,可能可以解决问题。如果以上方法不起作用,可以尝试卸载
nrm并重新安装:npm uninstall nrm npm install nrm如果问题仍然存在,可以提供更多的错误信息或日志,以便更好地 debug。
解决 无用评论 打赏 举报- 检查 Node.js 版本是否支持