azure函数部署错误:错误:eNote:没有这样的文件或目录,stat'/home/site/repository/node\u modules/.bin/semver'

ngynwnxp  于 2021-06-24  发布在  Kudu
关注(0)|答案(1)|浏览(265)

我正在尝试将节点中具有依赖关系的函数部署到linux容器中。根据文件(https://docs.microsoft.com/en-us/azure/azure-functions/functions-reference-node)如果有package.json,它应该运行 npm install 好好的。然而,我得到以下信息:

Command: "/home/site/deployments/tools/deploy.sh"
Handling function App deployment.
Not using funcpack because SCM_USE_FUNCPACK is not set to 1
Installing azure function extensions from nuget
Kudu sync from: '/home/site/repository' to: '/home/site/wwwroot'
Copying file: '.gitignore'
Copying file: 'README.md'
Copying file: 'host.json'
Copying file: 'package-lock.json'
Copying file: 'package.json'
Copying file: 'proxies.json'
Ignoring: .git
Copying file: 'node_modules/.bin/semver'
Error: ENOENT: no such file or directory, open '/home/site/wwwroot/node_modules/.bin/semver'
An error has occurred during web site deployment.
Kudu Sync failed
\n/opt/Kudu/bin/Scripts/starter.sh "/home/site/deployments/tools/deploy.sh"

进入容器后(https://.scm.azurewebsites.net)是因为semver是指向文件的链接吗?还有谁有这个问题,不管怎么说,都要绕开它吗?

lyfkaqu1

lyfkaqu11#

我删除了semver依赖项。我不相信Kudu能很好地处理链接文件

相关问题