首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >如何修复: TypeError [ERR_INVALID_ARG_TYPE]:“原始”参数必须是类型函数

如何修复: TypeError [ERR_INVALID_ARG_TYPE]:“原始”参数必须是类型函数
EN

Stack Overflow用户
提问于 2022-06-17 18:53:14
回答 1查看 416关注 0票数 -1

当通过CLI运行我的E2E测试时,我会得到以下错误,但是它在本地工作。

代码语言:javascript
复制
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咖啡厅-锤头。

EN

回答 1

Stack Overflow用户

发布于 2022-06-21 08:12:47

看起来您使用的是一个过时的Node.js版本,因为zlib.brotliCompress函数被计算为undefined。将其升级到14.x,并再次运行测试。

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/72663675

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档