首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >节点项目失败的Azure git部署

节点项目失败的Azure git部署
EN

Stack Overflow用户
提问于 2015-04-05 00:13:39
回答 1查看 2.3K关注 0票数 3

我正在尝试将我的项目部署到天蓝色。它正在失败。这些是我所采取的步骤。

代码语言:javascript
复制
git init
git config core.longpaths true
git add .
git commit -m "initial commit"

所有这些都有效。我配置了git以接受长路径,因为我需要chokidar,而且chokidar有一些深嵌套的依赖项,如果没有这种依赖,就可以最大限度地限制git的字符。然后我转到azure,制作一个新的web应用程序,选择自定义,从本地git存储库中部署,将远程回购添加到本地git。一切都正常。但是,当我运行git push azure master时,我会得到以下错误:

代码语言:javascript
复制
remote: Updating branch 'master'.
remote: Deployment failed
remote: Error - Changes committed to remote repository but deployment to website failed.

因此,我转到一个空目录,启用了长路径,并克隆了回购。它给了我一个错误:

代码语言:javascript
复制
remote: warning: unable to access 'node_modules/chokidar/node_modules/anymatch/node_modules/micromatch/node_modules/regex-cache/node_modules/benchmarked/node_modules/file-reader/node_modules/map-files/node_modules/globby/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/test/.gitattributes': Filename too long
remote: Counting objects: 5183, done.
remote: Compressing objects: 100% (3893/3893), done.
remote: Total 5183 (delta 489), reused 5183 (delta 489)
Receiving objects: 100% (5183/5183), 4.05 MiB | 1.51 MiB/s, done.
Resolving deltas: 100% (489/489), done.
Checking connectivity... done.
fatal: cannot create directory at 'node_modules/chokidar/node_modules/anymatch/node_modules/micromatch/node_modules/regex-cache/node_modules/benchmarked/node_modules/file-reader/node_modules/map-files/node_modules/globby/node_modules/array-union/node_modules/array-uniq': Filename too long
warning: Clone succeeded, but checkout failed.
You can inspect what was checked out with 'git status' and retry the checkout with 'git checkout -f HEAD'

有更多的错误,如上面的第一个。因此,我认为Git正在他们的服务器上运行,没有配置为接受长文件路径?我可以从版本控制中删除node_modules并配置azure来下载它们吗?

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2015-04-05 00:51:32

你说得对

  1. 将/node_modules添加到.gitignore。
  2. 将依赖项添加到您的packages.json中,并让Azure在部署时安装它们(每个新的/更新的包只安装一次)。

PS:由于您已经将/node_modules文件夹推送到版本控制,所以您必须首先删除它。

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/29452787

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档