【问题标题】:azure-functions-core-tools on Mac OSMac OS 上的 azure-functions-core-tools
【发布时间】:2018-10-14 09:24:25
【问题描述】:

我在 Mac 上使用 npm 5 和 node 8 使用了 azure-functions-core-tools NPM 包,但是我收到了警告,因此我已将 node 更新为 v8.11.1,将 npm 更新为 5.6.0。完成此操作后,我已经安装了 brew reinstall azure-functions-core-tools.NET Core SDK 2.1.105 以获得良好的效果。

但是运行 npm i -g azure-functions-core-tools@1.0.9npm i -g azure-functions-core-tools 会导致

npm ERR! code EBADPLATFORM
npm ERR! notsup Unsupported platform for azure-functions-core-tools@1.0.12: wanted {"os":"win32","arch":"any"} (current: {"os":"darwin","arch":"x64"})
npm ERR! notsup Valid OS:    win32
npm ERR! notsup Valid Arch:  any
npm ERR! notsup Actual OS:   darwin
npm ERR! notsup Actual Arch: x64

还有其他人有这个问题吗? Mac OS 10.12.6

我在两台 Mac 上遇到同样的情况

编辑:我什至在终端窗口 中找到了之前安装的 azure-functions-core-tools

【问题讨论】:

  • 奇怪,v1.0.9 的目标是 .net 框架,无法在 MAC 上运行。不知道根本原因。猜猜之前错过了运行时要求,并且在重新安装后已修复。

标签: azure azure-functions azure-functions-core-tools


【解决方案1】:

对于 Mac OS,您应该使用npm i -g azure-functions-core-tools@core 安装 Azure 功能核心工具 2.x,它可以是跨平台的。 azure-functions-core-tools 是 1.x,只能在 Windows 上运行。

更新

npm i -g azure-functions-core-tools现在也用于安装2.x核心工具,azure-functions-core-tools@1是1.x。最新命令见docs

【讨论】:

  • 谢谢,安装好了!但是我 100% 确定我之前在两台机器上都安装了 azure-functions-core-tools@1.0.9(.zsh_history 在今天之前只有 @1.0.9)
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 2021-05-30
  • 1970-01-01
  • 2022-01-09
  • 1970-01-01
  • 1970-01-01
  • 2022-11-18
  • 1970-01-01
相关资源
最近更新 更多