1

当我codecov在终端中执行时,Codecov 产生了这个错误。我的报道报告来自jest --coverage。这是错误:

(node:27540) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'startsWith' of undefined
    at Object.getAgent (C:\Users\adria\AppData\Roaming\npm\node_modules\codecov\node_modules\teeny-request\build\src\agents.js:33:24)
    at requestToFetchOptions (C:\Users\adria\AppData\Roaming\npm\node_modules\codecov\node_modules\teeny-request\build\src\index.js:65:30)
    at teenyRequest (C:\Users\adria\AppData\Roaming\npm\node_modules\codecov\node_modules\teeny-request\build\src\index.js:121:30)
    at C:\Users\adria\AppData\Roaming\npm\node_modules\codecov\lib\codecov.js:214:9
    at C:\Users\adria\AppData\Roaming\npm\node_modules\codecov\node_modules\teeny-request\build\src\index.js:219:13
    at processTicksAndRejections (internal/process/task_queues.js:93:5)
(Use `node --trace-warnings ...` to show where the warning was created)
(node:27540) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
(node:27540) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

问题是什么?

谢谢您的帮助!

4

0 回答 0