gpt4 book ai didi

node.js - azure 功能核心工具: while running "func init" command fails

转载 作者:行者123 更新时间:2023-12-03 00:41:36 26 4
gpt4 key购买 nike

从空目录执行“func init”命令来创建 azure 函数失败,并出现以下错误:

events.js:298
throw er; // Unhandled 'error' event
^

Error: spawn C:\Users\<XYZ>\AppData\Roaming\npm\node_modules\azure-functions-core-tools\bin/func ENOENT
at Process.ChildProcess._handle.onexit (internal/child_process.js:267:19)
at onErrorNT (internal/child_process.js:467:16)
at processTicksAndRejections (internal/process/task_queues.js:84:21)
Emitted 'error' event on ChildProcess instance at:
at Process.ChildProcess._handle.onexit (internal/child_process.js:273:12)
at onErrorNT (internal/child_process.js:467:16)
at processTicksAndRejections (internal/process/task_queues.js:84:21) {
errno: -4058,
code: 'ENOENT',
syscall: 'spawn C:\\Users\\<XYZ>\\AppData\\Roaming\\npm\\node_modules\\azure-functions-core-tools\\bin/func',
path: 'C:\\Users\\<XYZ>\\AppData\\Roaming\\npm\\node_modules\\azure-functions-core-tools\\bin/func',
spawnargs: [ 'init' ]
}

有人对此有什么建议吗?

最佳答案

感谢您的更新@silent。谷歌搜索相同,我也登陆了相同的链接。

为了跟进 Github 上的建议,我必须执行以下步骤:

  1. 转到文件夹:
C:\Users\< XYZ >\AppData\Roaming\npm\node_modules\azure-functions-core-tools
  • 在编辑器中打开 package.json 文件
  • 将依赖项下“unzipper”模块的版本从“0.10.5”修改为“0.10.8”。
  •  "dependencies": {
    "chalk": "3.0.0",
    "command-exists": "1.2.8",
    "glob": "7.1.6",
    "https-proxy-agent": "3.0.1",
    "progress": "2.0.3",
    "rimraf": "3.0.0",
    "tmp": "0.1.0",
    "unzipper": "0.10.8"
    },
  • 删除该目录下的“node_modules”文件夹。
  • 在命令提示符下从此目录运行“npm install”命令。
  • 请记住将“< XYZ >”替换为您自己的计算机上的用户名。

    关于node.js - azure 功能核心工具: while running "func init" command fails,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/60149342/

    26 4 0
    Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
    广告合作:1813099741@qq.com 6ren.com