Node.js Jest-未处理的PromiserExtraction TypeError路径必须是字符串
在安装了所有必要的依赖项(npm安装/bower安装)后尝试运行jest所有需要的包都在package.json中-我得到一个错误,如图所示:当我运行jest时-(我已尝试更改jest的版本) 我尝试运行应用程序:当我运行gulp serve时,我得到以下结果: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
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