azure-functions-cli:func init 吐出错误 "No such file or directory"
azure-functions-cli: func init spits error "No such file or directory"
我使用以下 URl 安装了 7.x NoodeJs,
https://github.com/nodesource/distributions
# Using Ubuntu
curl -sL https://deb.nodesource.com/setup_7.x | sudo -E bash -
sudo apt-get install -y nodejs
中的说明安装了 azure-functions-cli
npm i -g azure-functions-cli
现在,当我 运行 "func init" 时,出现以下错误,
$ 函数初始化
: 没有那个文件或目录
然后我尝试按以下方式运行它,但仍然出现错误,
$ node /usr/lib/node_modules/azure-functions-cli/lib/main.js init
events.js:161
throw er; // Unhandled 'error' event
^
Error: spawn mono /usr/lib/node_modules/azure-functions-cli/bin/func.exe ENOENT
at exports._errnoException (util.js:1023:11)
at Process.ChildProcess._handle.onexit (internal/child_process.js:193:32)
at onErrorNT (internal/child_process.js:359:16)
at _combinedTickCallback (internal/process/next_tick.js:74:11)
at process._tickCallback (internal/process/next_tick.js:98:9)
at Module.runMain (module.js:607:11)
at run (bootstrap_node.js:418:7)
at startup (bootstrap_node.js:139:9)
at bootstrap_node.js:533:3
我还尝试安装 Mono 并重新运行 命令,但也无济于事。我使用以下 URL 中的说明来安装 Mono,
安装单声道,
http://www.mono-project.com/docs/getting-started/install/linux/
Azure Functions CLI 不适用于 Windows 以外的平台。但是,我不确定您为什么会收到如此糟糕的错误消息。
在 Mono 上有一个到 运行 的 CLI 实验端口,但您需要自己构建项目。此外,它不支持 JavaScript 功能。代码位于 https://github.com/Azure/azure-functions-cli/tree/mono-support.
我使用以下 URl 安装了 7.x NoodeJs, https://github.com/nodesource/distributions
# Using Ubuntu
curl -sL https://deb.nodesource.com/setup_7.x | sudo -E bash -
sudo apt-get install -y nodejs
中的说明安装了 azure-functions-cli
npm i -g azure-functions-cli
现在,当我 运行 "func init" 时,出现以下错误, $ 函数初始化 : 没有那个文件或目录
然后我尝试按以下方式运行它,但仍然出现错误,
$ node /usr/lib/node_modules/azure-functions-cli/lib/main.js init
events.js:161
throw er; // Unhandled 'error' event
^
Error: spawn mono /usr/lib/node_modules/azure-functions-cli/bin/func.exe ENOENT
at exports._errnoException (util.js:1023:11)
at Process.ChildProcess._handle.onexit (internal/child_process.js:193:32)
at onErrorNT (internal/child_process.js:359:16)
at _combinedTickCallback (internal/process/next_tick.js:74:11)
at process._tickCallback (internal/process/next_tick.js:98:9)
at Module.runMain (module.js:607:11)
at run (bootstrap_node.js:418:7)
at startup (bootstrap_node.js:139:9)
at bootstrap_node.js:533:3
我还尝试安装 Mono 并重新运行 命令,但也无济于事。我使用以下 URL 中的说明来安装 Mono, 安装单声道, http://www.mono-project.com/docs/getting-started/install/linux/
Azure Functions CLI 不适用于 Windows 以外的平台。但是,我不确定您为什么会收到如此糟糕的错误消息。
在 Mono 上有一个到 运行 的 CLI 实验端口,但您需要自己构建项目。此外,它不支持 JavaScript 功能。代码位于 https://github.com/Azure/azure-functions-cli/tree/mono-support.