【发布时间】:2017-10-12 09:43:58
【问题描述】:
在安装所有必要的依赖项(npm install/bower install)后尝试运行 jest,所有需要的包仍然在 package.json 中 - 我得到一个错误,如图所示:当我运行 jest -(我已经尝试更改版本开玩笑的)
Using Jest CLI v0.7.1
(node:9212) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): TypeError: Path must be a string. Received [//path of the file]
我尝试运行该应用程序:当我运行 gulp serve 时,我得到以下信息:
Unhandled promise rejection (rejection id: 3): TypeError: $.ajax is not a function
这两个错误是否相关。 请参考以下文件:
1) 我正在使用的完整源代码
https://www.dropbox.com/sh/mc3j9k4qetz7dsm/AADOgMl7AQov0BDzhDDvKdzva?dl=0
2) 错误显示方式的截屏 https://www.dropbox.com/s/v45wlizc47f8kbc/JestAjaxfunction_PromiseRejection.wmv?dl=0
感谢您的帮助, 纳文
【问题讨论】:
标签: node.js ajax reactjs gulp jestjs