为什么.tar文件会生成数百个PaxHeader文件?

我正在设置一个AutoCI – > Jenkins – > Octopus自动构build过程。 我使用一个名为octopackjs&gulp-octo的包将我的node.js项目打包成.tar文件,如下所示:

return gulp.src(['**/*', '!gulpfile.js']) .pipe(octo.pack("tar.gz")) .pipe(octo.push({apiKey: 'API-SUPERCOOLKEY', host: 'https://octopus.supercooldomain.net', replace: true})); 

我可以把它打包起来,然后把它推到八达通服务器的正确位置。 但是,当我检查.tar文件的内容时,它被数百个名为“PaxHeader”的文件所污染。 从一些环顾四周,该文件旨在包含.tar包的元数据。 当八达通尝试将该文件提取到我的目标环境时,它会引发以下错误跟踪:

 System.IO.IOException: Cannot create /home/opsteam/.octopus/Applications/OctopusServer/Dev.Corporate/webapp/2.0.10/PaxHeader because a file with the same name already exists. 09:46:34Error at System.IO.Directory.CreateDirectory (System.String path) <0x7fdc9e79db50 + 0x00167> in <filename unknown>:0 09:46:34Error at SharpCompress.Reader.IReaderExtensions.WriteEntryToDirectory (IReader reader, System.String destinationDirectory, ExtractOptions options) <0x4033e800 + 0x00260> in <filename unknown>:0 09:46:34Error at Calamari.Integration.Packages.TarPackageExtractor.Extract (System.String packageFile, System.String directory, Boolean suppressNestedScriptWarning) <0x4033b4f0 + 0x000f3> in <filename unknown>:0 09:46:34Error at Calamari.Integration.Packages.GenericPackageExtractor.Extract (System.String packageFile, System.String directory, Boolean suppressNestedScriptWarning) <0x4033b4a0 + 0x0003b> in <filename unknown>:0 09:46:34Error at Calamari.Deployment.Conventions.ExtractPackageConvention.Install (Calamari.Deployment.RunningDeployment deployment) <0x40335ac0 + 0x000bb> in <filename unknown>:0 09:46:34Error at Calamari.Deployment.ConventionProcessor.RunInstallConventions () <0x4030aaa0 + 0x00065> in <filename unknown>:0 09:46:34Error at Calamari.Deployment.ConventionProcessor.RunConventions () <0x4030a940 + 0x0001f> in <filename unknown>:0 

到底是怎么回事? 为什么我的.tar文件有这些工件?

编辑:这些PaxHeader文件的内容,当作为文本打开时,从项目中的模块的package.json内容到随机许可信息,到目录,string列表等等。

有同样的问题,并为我解决这个问题是升级npm到最新版本(3.10.7截图的时刻)build议在最后的post之一http://help.octopusdeploy.com/discussions/problems/46332-deploy -to-linux-centos7-deploy-failing 。

不知道如果你是Windows或Windows,但我使用npm-windows-upgrade在这个SOpostbuild议: 我如何更新窗口上的节点和npm? 。

然后刷新所有node_modules并在项目上进行新鲜的npm安装。 结果存档不仅包含重复的PaxHeader文件,而且还更快地生成。

Interesting Posts