typescript - 加载配置文件 main/conf.ts 失败错误代码:105
问题描述
尝试使用量角器 main/conf.ts运行量角器测试时收到错误消息
[15:01:30] E/configParser - Error: password should be a string
at Object.ensure (C:\Repos\...\node_modules\tiny-types\lib\ensure.js:36:15)
at new Authenticator (C:\Repos\...\node_modules\authenticator-browser-extension\lib\Authenticator.js:23:22)
at Function.Authenticator.for (C:\Repos\...\node_modules\authenticator-browser-extension\lib\Authenticator.js:36:16)
at Object.<anonymous> (C:\Repos\...\main\conf.ts:30:26)
at Module._compile (internal/modules/cjs/loader.js:1063:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)
at Module.load (internal/modules/cjs/loader.js:928:32)
at Function.Module._load (internal/modules/cjs/loader.js:769:14)
at Module.require (internal/modules/cjs/loader.js:952:19)
at require (internal/modules/cjs/helpers.js:88:18)
[15:01:30] E/configParser - 错误代码:105 [15:01:30] E/configParser - 错误消息:加载配置文件 main/conf.ts [15:01:30] E/configParser - 错误: 密码应该是一个字符串 在 Object.ensure (C:\Repos...\node_modules\tiny-types\lib\ensure.js:36:15) 在 new Authenticator (C:\Repos...\node_modules\authenticator-browser-extension\lib \Authenticator.js:23:22) 在 Function.Authenticator.for (C:\Repos...\node_modules\authenticator-browser-extension\lib\Authenticator.js:36:16) 在 Object. (C:\Repos...\main\conf.ts:30:26) 在 Module._compile (internal/modules/cjs/loader.js:1063:30) 在 Object.Module._extensions..js (internal/ modules/cjs/loader.js:1092:10) 在 Module.load (internal/modules/cjs/loader.js:928:32) 在 Function.Module._load (internal/modules/cjs/loader.js:769: 14) 在 Module.require (internal/modules/cjs/loader.js:952:19) 在 require (internal/modules/cjs/helpers.js:88:18)
.env 文件: `username=abc@myemail.com
密码=abc@myemail.com
baseUrl=https://mywebsite.com
sql_server = testdb.database.windows.net
sql_database = test-tst-sqldb
db_password = testpassword`
解决方案
尝试在密码中使用双引号。所以代替 password=abc@myemail.com 使用
password "abc@myemail.com"
推荐阅读
- docker - Docker - 将新的 Wordpress 容器添加到现有的 SQL 数据库容器
- ssh - 本地守护进程的 SSH 指纹
- jquery - jQuery克隆缺少掩码
- bing-api - 必应视觉搜索未正确返回图像标签
- python - Python 作为 Windows 服务使用 speedtest-cli 返回错误 1053
- shell - 如何在 AWS Fargate 上运行的 shell 脚本中输入超过 80 个字符
- javascript - Electron 和 Webkit 浏览器显示错误的颜色
- amazon-web-services - 从 S3 流 1TB GZIP,解压上传到 S3
- c# - 捕获传统事件并使用 IProgress 进行报告
- powershell - Powershell 对象数组到 Convertto-html