当通过CLI运行我的E2E测试时,我会得到以下错误,但是它在本地工作。
TypeError [ERR_INVALID_ARG_TYPE]: The "original" argument must be of type Function. Received type undefined
at Object.promisify (internal/util.js:256:11)
at Object.<anonymous> (D:\Octopus\Applications\Staging\e2e\0.0.108\node_modules\testcafe\node_modules\testcafe-hammerhead\lib\utils\promisified-functions.js:16:33)
at Module._compile (internal/modules/cjs/loader.js:689:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:700:10)
at Module.load (internal/modules/cjs/loader.js:599:32)
at tryModuleLoad (internal/modules/cjs/loader.js:538:12)
at Function.Module._load (internal/modules/cjs/loader.js:530:3)
at Module.require (internal/modules/cjs/loader.js:637:17)
at require (internal/modules/cjs/helpers.js:22:18)
at Object.<anonymous> (D:\Octopus\Applications\Staging\e2e\0.0.108\node_modules\testcafe\node_modules\testcafe-hammerhead\lib\request-pipeline\file-request\base-resource.js:7:33) 我已经更新了npm,Node,Test咖啡馆和Test咖啡厅-锤头。
发布于 2022-06-21 08:12:47
看起来您使用的是一个过时的Node.js版本,因为zlib.brotliCompress函数被计算为undefined。将其升级到14.x,并再次运行测试。
https://stackoverflow.com/questions/72663675
复制相似问题