【问题标题】:Installing node on Windows with bash使用 bash 在 Windows 上安装节点
【发布时间】:2019-05-08 14:56:59
【问题描述】:

我去了nodejs.org并使用向导在最新的Windows 10上安装了node。

我还为 Windows 启用了 Windows 子系统,并从商店下载了 Ubuntu,这样我就有了一个 Bash 终端。

在 bash 中,命令 node -v 返回消息:

Command 'node' not found, but can be installed with:

sudo apt install nodejs

我尝试运行该命令,但它返回“无法找到包 nodejs”

我希望能够从终端使用npm install(随节点安装一起提供)。我一直用Mac。如何为 Windows 设置它?

【问题讨论】:

    标签: node.js windows bash windows-subsystem-for-linux


    【解决方案1】:

    你的能力更新了吗?您需要将其连接到互联网,以检查自操作系统发布以来提供的内容。

    sudo apt update && sudo apt install -y nodejs
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多