无法在 npm 命令行中使用方向键

Cannot use arrow keys in npm command line

我正在尝试设置 FireBase 函数,当我使用命令时

npm firebase init functions

我被要求为我设置的目录选择一个默认项目。我的列表已正确填充,但我无法使用箭头键 select 选项。 (按上或下,甚至输入都没有任何反应)

这是我的版本:

  1. Windows 10
  2. NodeJS v8.1.0
  3. npm v5.0.3
  4. FireBase v3.9.1

问题截图:

事实证明,您所要做的就是更新您的 Firebase CLI 工具,并降级 npm 版本。

我通过将我的 NodeJS 降级到 v6.11.0 解决了这个问题。

此外,我通过 运行

更新了我的 FireBase CLI
npm install -g firebase-tools

使用 nvm-windows 作为 npm 的版本控制器。

应该可以解决问题。

Link: nvm-windows