首页 > 解决方案 > 尝试使用 npm (v6.2.1) 安装任何软件包时节点 9.x 中的异步写入错误?

问题描述

我安装了 Ubunutu 16.04 LTS 和节点版本 9.x。当我尝试使用通常的命令安装任何 npm 包时,它给了我以下错误。

npm ERR! asyncWrite is not a function
npm ERR! pna.nextTick is not a function

npm ERR! A complete log of this run can be found in:
npm ERR!     /root/.npm/_logs/2018-06-03T15_04_58_766Z-debug.log

我在这里先向您的帮助表示感谢。

标签: node.jsnpm

解决方案


尝试将你的 nodejs 降级到 8.11.2

sudo npm cache clean -f
sudo npm install -g n
sudo n 8.11.2

推荐阅读