我正在尝试将具有依赖性的节点中的功能部署到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://XXX.scm.azurewebsites.net)之后,是因为semver是文件的链接吗? 有人遇到这个问题了吗?
答案 0 :(得分:1)
我删除了semver依赖项。我不相信Kudu可以很好地处理链接文件