节点项目的Azure部署混帐失败 [英] Azure git deploy of node project failing

查看:140
本文介绍了节点项目的Azure部署混帐失败的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想我的部署项目的Azure。这是失败的。这是我采取的步骤。

I am trying to deploy my project to azure. It is failing. These are the steps I took.

git init
git config core.longpaths true
git add .
git commit -m "initial commit"

所有的作品。我配置的git,因为我需要chokidar接受长路径和chokidar具有一定的深度嵌套的依赖关系最大输出Git的字符限制没有这个。于是我去到蔚蓝,使一个新的Web应用程序,选择自定义,从本地git仓库部署,远程回购加入到当地的饭桶。一切正常。但是,当我运行混帐推蔚蓝的主,我得到这个错误:

remote: Updating branch 'master'.
remote: Deployment failed
remote: Error - Changes committed to remote repository but deployment to website failed.

所以我去了一个空目录,使长路径,并克隆回购。它给了我这个错误:

So I went to an empty directory, enabled long paths, and cloned the repo. It gave me this error:

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的Azure是他们的服务器上运行,没有配置为接受长文件路径?我可以从可能的版本控制删除node_modules和配置蔚蓝下载它们?

There were a lot more errors like the first above. So I think the Git Azure is running on their server is not configured to accept long file paths? Could I maybe remove node_modules from version control and configure azure to download them?

推荐答案

您是正确的。


  1. 添加/ node_modules到的.gitignore。

  2. 添加依赖你packages.json,让天青在部署安装它们(仅一次性安装为每个新的/更新的软件包)。

PS:既然你已经被推/ node_modules文件夹到版本控制,你要去必须先删除

PS: Since you already pushed /node_modules folder to the version control you gonna have to remove it first.

这篇关于节点项目的Azure部署混帐失败的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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