Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/ajax/6.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Node.js Jest-未处理的PromiserExtraction TypeError路径必须是字符串_Node.js_Ajax_Reactjs_Gulp_Jestjs - Fatal编程技术网

Node.js Jest-未处理的PromiserExtraction TypeError路径必须是字符串

Node.js Jest-未处理的PromiserExtraction TypeError路径必须是字符串,node.js,ajax,reactjs,gulp,jestjs,Node.js,Ajax,Reactjs,Gulp,Jestjs,在安装了所有必要的依赖项(npm安装/bower安装)后尝试运行jest所有需要的包都在package.json中-我得到一个错误,如图所示:当我运行jest时-(我已尝试更改jest的版本) 我尝试运行应用程序:当我运行gulp serve时,我得到以下结果: Unhandled promise rejection (rejection id: 3): TypeError: $.ajax is not a function 这两个错误是否相关。 请使用以下文件作为参考: 1) 完整的源代码I

在安装了所有必要的依赖项(npm安装/bower安装)后尝试运行jest所有需要的包都在package.json中-我得到一个错误,如图所示:当我运行jest时-(我已尝试更改jest的版本)

我尝试运行应用程序:当我运行gulp serve时,我得到以下结果:

Unhandled promise rejection (rejection id: 3): TypeError: $.ajax is not a function
这两个错误是否相关。 请使用以下文件作为参考:

1) 完整的源代码Im使用

2) 错误显示方式的屏幕投射

谢谢你的帮助,
Naveen

在我的例子中,这个错误发生在更新jest 21之后

修复是在我调用jest时进行的,包括
(当前目录)

中断:
cross env BABEL\u DISABLE\u CACHE=1节点\u env=test节点--harmony\u proxies节点\u modules/.bin/jest

修复:
cross-env-BABEL\u-DISABLE\u-CACHE=1节点\u-env=test节点--harmony\u-proxies节点\u-modules/.bin/jest.

Unhandled promise rejection (rejection id: 3): TypeError: $.ajax is not a function