TFS(预置)构建输出显示错误的字符编码
TFS (on premise) build output shown with wrong character-encoding
我们有如下所示的 TFS2015 和构建定义:
当我触发构建时,我得到了错误字符编码的输出:
2016-09-07T11:40:29.2722404Z ΓööΓöÇΓöÇ readable-stream@2.1.5 (buffer-shims@1.0.0, inherits@2.0.1, string_decoder@0.10.31, core-util-is@1.0.2, util-deprecate@1.0.2, process-nextick-args@1.0.7, isarray@1.0.0)
2016-09-07T11:40:29.2722404Z run-sequence@1.2.2 node_modules\run-sequence
2016-09-07T11:40:29.2722404Z ΓööΓöÇΓöÇ chalk@1.1.3 (supports-color@2.0.0, escape-string-regexp@1.0.5, ansi-styles@2.2.1, strip-ansi@3.0.1, has-ansi@2.0.0)
2016-09-07T11:40:29.2722404Z vinyl-source-stream@1.1.0 node_modules\vinyl-source-stream
2016-09-07T11:40:29.2722404Z Γö£ΓöÇΓöÇ vinyl@0.4.6 (clone-stats@0.0.1, clone@0.2.0)
2016-09-07T11:40:29.2722404Z ΓööΓöÇΓöÇ through2@0.6.5 (xtend@4.0.1, readable-stream@1.0.34)
2016-09-07T11:40:29.2722404Z gulp-concat@2.6.0 node_modules\gulp-concat
2016-09-07T11:40:29.2762404Z Γö£ΓöÇΓöÇ concat-with-sourcemaps@1.0.4 (source-map@0.5.6)
2016-09-07T11:40:29.2762404Z ΓööΓöÇΓöÇ through2@0.6.5 (xtend@4.0.1, readable-stream@1.0.34)
2016-09-07T11:40:29.2762404Z vinyl-buffer@1.0.0 node_modules\vinyl-buffer
2016-09-07T11:40:29.2762404Z Γö£ΓöÇΓöÇ through2@0.6.5 (xtend@4.0.1, readable-stream@1.0.34)
知道如何解决吗?
编辑:当我登录到构建服务器虚拟机并从命令提示符 运行 npm install 时,我得到正确的输出:
run-sequence@1.2.2 node_modules\run-sequence
└── chalk@1.1.3 (escape-string-regexp@1.0.5, ansi-styles@2.2.1, supports-color@2.0.0, has-ansi@2.0.0, strip-ansi@3.0.1)
merge-stream@1.0.0 node_modules\merge-stream
└── readable-stream@2.1.5 (inherits@2.0.3, buffer-shims@1.0.0, string_decoder@0.10.31, process-nextick-args@1.0.7, util-deprecate@1.0.2, core-util-is@1.0.2, isarray@1.0.0)
vinyl-source-stream@1.1.0 node_modules\vinyl-source-stream
├── vinyl@0.4.6 (clone-stats@0.0.1, clone@0.2.0)
└── through2@0.6.5 (xtend@4.0.1, readable-stream@1.0.34)
开发机器环境:
OS Name: Microsoft Windows 10 Enterprise
Active code page: 437 (both build server and dev machine)
System Locale: sk;Slovak
Node version: 5.10.1
NPM version: 3.8.5
构建服务器环境
OS Name: Microsoft Windows Server 2012 R2 Standard
Active code page: 437 (both build server and dev machine)
System Locale: en-us;English (United States)
Node version: 5.10.1
NPM version: 3.8.5
TFS 版本为 14.102.25423.0(更新 3),但它驻留在另一台服务器上,我无权访问。我只看到门户网站。
重现步骤:
- npm 初始化
- npm install 运行-sequence --save-dev
- 推送到 TFS Git 存储库
- 单步创建构建定义:npm install
- 排队新构建
我已经在我的构建中尝试了 gulp imagemin 任务,但无法在我这边重现您的问题。为了缩小问题范围,请检查:
- TFS 2015是否升级到最新版Update 3。
- 检查 npm 是否是构建服务器上的最新版本。
- 在构建代理服务器上手动 运行 gulp 任务以查看问题是否可以重现。
- 如果上述选项不起作用,请分享您构建任务的详细设置,我想设置相同的环境以检查您的问题是否可以重现。
既然你提到它在 运行 从命令提示符安装 npm 时有效,你也可以在你的构建定义中添加一个 "Command Line" 任务到 运行 npm install 命令。
我们有如下所示的 TFS2015 和构建定义:
当我触发构建时,我得到了错误字符编码的输出:
2016-09-07T11:40:29.2722404Z ΓööΓöÇΓöÇ readable-stream@2.1.5 (buffer-shims@1.0.0, inherits@2.0.1, string_decoder@0.10.31, core-util-is@1.0.2, util-deprecate@1.0.2, process-nextick-args@1.0.7, isarray@1.0.0)
2016-09-07T11:40:29.2722404Z run-sequence@1.2.2 node_modules\run-sequence
2016-09-07T11:40:29.2722404Z ΓööΓöÇΓöÇ chalk@1.1.3 (supports-color@2.0.0, escape-string-regexp@1.0.5, ansi-styles@2.2.1, strip-ansi@3.0.1, has-ansi@2.0.0)
2016-09-07T11:40:29.2722404Z vinyl-source-stream@1.1.0 node_modules\vinyl-source-stream
2016-09-07T11:40:29.2722404Z Γö£ΓöÇΓöÇ vinyl@0.4.6 (clone-stats@0.0.1, clone@0.2.0)
2016-09-07T11:40:29.2722404Z ΓööΓöÇΓöÇ through2@0.6.5 (xtend@4.0.1, readable-stream@1.0.34)
2016-09-07T11:40:29.2722404Z gulp-concat@2.6.0 node_modules\gulp-concat
2016-09-07T11:40:29.2762404Z Γö£ΓöÇΓöÇ concat-with-sourcemaps@1.0.4 (source-map@0.5.6)
2016-09-07T11:40:29.2762404Z ΓööΓöÇΓöÇ through2@0.6.5 (xtend@4.0.1, readable-stream@1.0.34)
2016-09-07T11:40:29.2762404Z vinyl-buffer@1.0.0 node_modules\vinyl-buffer
2016-09-07T11:40:29.2762404Z Γö£ΓöÇΓöÇ through2@0.6.5 (xtend@4.0.1, readable-stream@1.0.34)
知道如何解决吗?
编辑:当我登录到构建服务器虚拟机并从命令提示符 运行 npm install 时,我得到正确的输出:
run-sequence@1.2.2 node_modules\run-sequence
└── chalk@1.1.3 (escape-string-regexp@1.0.5, ansi-styles@2.2.1, supports-color@2.0.0, has-ansi@2.0.0, strip-ansi@3.0.1)
merge-stream@1.0.0 node_modules\merge-stream
└── readable-stream@2.1.5 (inherits@2.0.3, buffer-shims@1.0.0, string_decoder@0.10.31, process-nextick-args@1.0.7, util-deprecate@1.0.2, core-util-is@1.0.2, isarray@1.0.0)
vinyl-source-stream@1.1.0 node_modules\vinyl-source-stream
├── vinyl@0.4.6 (clone-stats@0.0.1, clone@0.2.0)
└── through2@0.6.5 (xtend@4.0.1, readable-stream@1.0.34)
开发机器环境:
OS Name: Microsoft Windows 10 Enterprise Active code page: 437 (both build server and dev machine) System Locale: sk;Slovak Node version: 5.10.1 NPM version: 3.8.5
构建服务器环境
OS Name: Microsoft Windows Server 2012 R2 Standard Active code page: 437 (both build server and dev machine) System Locale: en-us;English (United States) Node version: 5.10.1 NPM version: 3.8.5
TFS 版本为 14.102.25423.0(更新 3),但它驻留在另一台服务器上,我无权访问。我只看到门户网站。
重现步骤:
- npm 初始化
- npm install 运行-sequence --save-dev
- 推送到 TFS Git 存储库
- 单步创建构建定义:npm install
- 排队新构建
我已经在我的构建中尝试了 gulp imagemin 任务,但无法在我这边重现您的问题。为了缩小问题范围,请检查:
- TFS 2015是否升级到最新版Update 3。
- 检查 npm 是否是构建服务器上的最新版本。
- 在构建代理服务器上手动 运行 gulp 任务以查看问题是否可以重现。
- 如果上述选项不起作用,请分享您构建任务的详细设置,我想设置相同的环境以检查您的问题是否可以重现。
既然你提到它在 运行 从命令提示符安装 npm 时有效,你也可以在你的构建定义中添加一个 "Command Line" 任务到 运行 npm install 命令。