簡體   English   中英

我無法在本地運行Azure函數核心工具

[英]I cannot run azure functions core tools locally

我已經在Ubuntu上安裝了azure函數核心工具。 但是它無法運行,當我嘗試運行此命令時,它將返回此錯誤:

 internal/child_process.js:323 throw errnoException(err, 'spawn'); ^ Error: spawn EACCES at _errnoException (util.js:1022:11) at ChildProcess.spawn (internal/child_process.js:323:11) at exports.spawn (child_process.js:502:9) at main (/usr/local/lib/node_modules/azure-functions-core-tools/lib/main.js:12:20) at Object.<anonymous> (/usr/local/lib/node_modules/azure-functions-core-tools/lib/main.js:21:1) at Module._compile (module.js:652:30) at Object.Module._extensions..js (module.js:663:10) at Module.load (module.js:565:32) at tryModuleLoad (module.js:505:12) at Function.Module._load (module.js:497:3) 
並預先感謝。

beta.23在Mac和Linux上確實存在問題,但@core標記應位於beta.23-1 ,該問題已得到修復。

嘗試運行npm -g list azure-functions-core-tools以驗證您應該使用的版本

/usr/lib
└── azure-functions-core-tools@2.0.1-beta.23-1 

不是

/usr/lib
└── azure-functions-core-tools@2.0.1-beta.23

或者,您可以通過運行sudo chmod 755 $(which func)編輯beta.23 。它實際上是sudo chmod 755 /usr/lib/node_modules/azure-functions-core-tools/bin/func

由於這個問題 ,我也正在准備一個新版本,並將在不久后發布

編輯:

順便說一句,如果您在Debian / Ubuntu / Mint上運行,則Microsoft源碼中現在有一個deb軟件包。 因此,您可以添加它並運行apt-get install azure-functions-core-tools而不是npm。 說明在自述文件中

編輯2:

對於Mac OS,您現在可以

brew tap azure/functions
brew install azure-functions-core-tools

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM