问题
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