首页 > 解决方案 > 加载配置文件 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`

标签: typescriptprotractor

解决方案


尝试在密码中使用双引号。所以代替 password=abc@myemail.com 使用

password "abc@myemail.com"

推荐阅读