addyosmani / addyosmani/puppeteer-webperf

first-contentful-paint.js: Cannot read property 'startTime' of undefined

未關閉
#11 1 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視
主要語言
JavaScript
星號
1.9k
分支
91
PR 合併指標
30 天內沒有已合併 PR

描述

I can't see the problem, but I have an error running the script `first-contentful-paint.js`.

### Error

```sh
➜ node first-contentful-paint.js
First paint: 111.78500001551583
(node:4558) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'startTime' of undefined
at /Users/joan.leon/projects/PerfReviews/.../puppeteer-webperf/first-contentful-paint.js:24:55
at processTicksAndRejections (internal/process/task_queues.js:93:5)
(node:4558) 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(). (rejection id: 1)
(node:4558) [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.
```

I have try to print the `firstContentfulPaint` value, and he has an empty array.

```sh
➜ node first-contentful-paint.js
firstContentfulPaint: []
First paint: 113.004999991972
``

貢獻指南

這個儲存庫沒有索引到貢獻指南

評估

這個 Issue 還沒有評估資料。

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。