azure-functions-core-tools on Mac OS

荒凉一梦 提交于 2019-12-13 03:31:55

问题


I've used azure-functions-core-tools NPM package on a Mac using npm 5 and node 8, however I've got warnings, so I've updated node to v8.11.1 and npm to 5.6.0. After doing this I've installed brew reinstall azure-functions-core-tools and .NET Core SDK 2.1.105 for good measure.

However running npm i -g azure-functions-core-tools@1.0.9 or npm i -g azure-functions-core-tools results in

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

Does anyone else has this issue? Mac OS 10.12.6

I have same situation on two macs

EDIT: I even found previous install of azure-functions-core-tools in a terminal window


回答1:


For Mac OS, you should use npm i -g azure-functions-core-tools@core to install Azure function core tools 2.x, which can be cross-platform. azure-functions-core-tools is 1.x and can only run on Windows.

Update

npm i -g azure-functions-core-tools now is also used to install 2.x core tools, azure-functions-core-tools@1 is 1.x. See docs for latest command.



来源:https://stackoverflow.com/questions/50165619/azure-functions-core-tools-on-mac-os

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!