does not work with vite
- 主要言語
- TypeScript
- スター
- 1.2k
- フォーク
- 242
- PR マージ指標
- 30日以内にマージされた PR はありません
説明
It throws error as `global is not defined`
```txt
Error: global is not defined
at node_modules/.pnpm/event-stream@3.3.4/node_modules/event-stream/index.js (http://localhost:3000/_nuxt/node_modules/.cache/vite/client/deps/httpsnippet_src_index.js?v=8be32947:2722:23)
at __require (http://localhost:3000/_nuxt/node_modules/.cache/vite/client/deps/chunk-5WWUZCGV.js?v=8be32947:8:50)
at node_modules/.pnpm/httpsnippet@2.0.0_mkdirp@1.0.4/node_modules/httpsnippet/src/index.js (http://localhost:3000/_nuxt/node_modules/.cache/vite/client/deps/httpsnippet_src_index.js?v=8be32947:10392:14)
at __require (http://localhost:3000/_nuxt/node_modules/.cache/vite/client/deps/chunk-5WWUZCGV.js?v=8be32947:8:50)
at http://localhost:3000/_nuxt/node_modules/.cache/vite/client/deps/httpsnippet_src_index.js?v=8be32947:10614:16
```
which is because of the library `event-stream` is not a browser compatible lib?
Using version: 3.0.1
vite: 4.4.9
コントリビューションガイド
調査の方向性
Start by tracing the event-stream dependency shown in the stack trace and its import from httpsnippet/src/index.js under a Vite browser build. Confirm the failure with the reported Vite 4.4.9 setup; done means the package builds and runs in the browser without the global-is-not-defined error.
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- typescript, vite
- 領域
- build-system, frontend
- issue の種類
- バグ
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 35/100