Cannot find module 'node:util'
时间: 2023-08-25 07:16:09 浏览: 136
回答: 出现 "Cannot find module 'node:util'" 的错误是因为 npm 版本与 cnpm 的版本不匹配导致的。解决这个问题的方法是卸载刚刚安装的 cnpm,使用命令 "npm uninstall cnpm"。如果你使用的是 CentOS 7 虚拟机,在安装 node 的过程中遇到了类似的错误 "Error: Cannot find module '…/lib/utils/unsupported.js'",可能是因为软连接的问题。你可以尝试删除原本的 npm 连接,然后重新建立一个连接。你可以通过命令 "cnpm -v" 来查看你的 cnpm 版本信息。<em>1</em><em>2</em><em>3</em>
#### 引用[.reference_title]
- *1* [cnpm 安装报错Error_ Cannot find module ‘node_util](https://blog.csdn.net/JZH20/article/details/131049189)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v92^chatsearchT3_1"}} ] [.reference_item]
- *2* [Centos7中安装Node出现Cannot find module ‘../lib/utils/unsupported.js‘问题](https://blog.csdn.net/weixin_38080573/article/details/118296776)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v92^chatsearchT3_1"}} ] [.reference_item]
- *3* [【笔记】Error: Cannot find module ‘node:util‘问题解决](https://blog.csdn.net/zqbx212/article/details/132119027)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v92^chatsearchT3_1"}} ] [.reference_item]
[ .reference_list ]
阅读全文