bytecodealliance / bytecodealliance/ComponentizeJS

Calls to setTimeout during initialization cause build to fail

未關閉
#246 2 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視
bug feature/wizer js-ecosystem-interop
主要語言
Rust
星號
391
分支
53
平均合併
3 天 5 小時
30 天內合併 PR
1

描述

I'm attempting to build some code using the [pdfkit](https://www.npmjs.com/package/pdfkit) library and after replacing any APIs that are not currently supported I'm met with the following error:

```
Exception while evaluating top-level script
pdfkit.js:29390:26 TypeError: setTimeout can only be used during request handling, not during initialization
Additionally, some promises were rejected, but the rejection never handled:
Promise rejected but never handled: setTimeout can only be used during request handling, not during initialization
Stack:
dew$28/FSWatcher2/_this._persist@pdfkit.js:29390:26
dew$28/FSWatcher2.prototype.start@pdfkit.js:29498:30
dew$28/Volume2.prototype.watch@pdfkit.js:29065:17
watchStdo@pdfkit.js:29594:7
node_modules/.pnpm/@jspm+core@2.1.0/node_modules/@jspm/core/nodelibs/browser/fs.js@pdfkit.js:29756:14
__init@pdfkit.js:14:56
@pdfkit.js:42457:1
```

This can be reproduced by cloning my [test repo](https://github.com/brettkolodny/react-pdf-wasm) and running the following command:

```
pnpm install --frozen-lockfile
pnpm build:pdf-kit
```

貢獻指南

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

評估

這個 Issue 還沒有評估資料。

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

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