Azure Function部署错误:错误:ENOENT:没有这样的文件或目录,stat'/home/site/repository/node_modules/.bin/semver' [英] Azure Function deployment error: Error: ENOENT: no such file or directory, stat '/home/site/repository/node_modules/.bin/semver'

查看:122
本文介绍了Azure Function部署错误:错误:ENOENT:没有这样的文件或目录,stat'/home/site/repository/node_modules/.bin/semver'的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试将具有依赖性的节点中的功能部署到Linux容器中.根据docs( https://docs.microsoft.com/en-us/azure/azure-functions/functions-reference-node )(如果有package.json,则应运行 npm install 并可以).但是我得到以下信息:

I am trying to deploy a Function in node that has dependencies into a Linux container. According to the docs (https://docs.microsoft.com/en-us/azure/azure-functions/functions-reference-node) if there is a package.json it should run npm install and be fine. However I get the following:

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是文件的链接?有人遇到这个问题了吗?

After getting into the container (https://XXX.scm.azurewebsites.net) Is it because semver is a link to a file? Anybody else have this issue and anyway to get around it?

推荐答案

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

I removed the semver dependency. I'm not convinced Kudu plays nicely with linked files

这篇关于Azure Function部署错误:错误:ENOENT:没有这样的文件或目录,stat'/home/site/repository/node_modules/.bin/semver'的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆