Undici v6 imported by @nuxt/scripts since v1.3.4
まだ誰も着手していません。
評価
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 初心者へのやさしさ
- 58/100
- issue の種類
- バグ
- 明瞭さ
- おおむね明確
- 活発さ
- 活発
- 技術スタック
- node.js, nuxtjs, typescript
調査の方向性
まず @nuxt/scripts の依存関係の設定と関連する PR #860 および #870 を確認し、Undici v6 がまだどこから取り込まれているかを特定します。@nuxt/scripts を壊すことなく依存関係が削除されていることを確認し、本番環境の Nuxt サーバーが interceptors.cache エラーなしで Undici v8 を使用できることを検証します。
索引モデルが issue の本文から書いたものです。
説明
Undici v6 is imported by @nuxt/scripts since v1.3.4 at least up to v1.3.8.
In our case, it conflicts in some hidden way with our own import of undici v8, causing our nitro plugin for enabling the cache (inexistent in v6) to fail, failing our startup, but only on actual servers, not in dev mode.
import { setGlobalDispatcher, Agent, interceptors } from 'undici';
export default defineNitroPlugin(() => {
setGlobalDispatcher(new Agent().compose(interceptors.cache()));
});
=>
Application has thrown an uncaught exception and is terminated:
TypeError: interceptors.cache is not a function
at file:///D:/frontend/server/chunks/_/nitro.mjs:8221:18
at runNitroPlugins (file:///D:/XVRT/frontend/server/chunks/_/nitro.mjs:18122:7)
at file:///D:/frontend/server/chunks/_/nitro.mjs:18133:1
at ModuleJob.run (node:internal/modules/esm/module_job:439:25)
at process.processTicksAndRejections (node:internal/process/task_queues:104:5)
at async node:internal/modules/esm/loader:643:26
Workaround: add a package override to force undici v8 to be picked-up.
It seems a few PR have been done to cease bringing Undici through @nuxt/scripts, like #860 and #870. Is it possible to remove it entirely from @nuxt/scripts?
(I have tried a repro on Stackblitz, but I have been unable to repro on it or on a dev workstation.)
- 主要言語
- TypeScript
- スター
- 584
- フォーク
- 91
- 平均マージ
- 1日 36分
- マージ済み PR(30日)
- 29
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
nuxt/scripts のほかの issue
-
harlan-agent-wait-to-implement
難易度 4/5 3〜5日 初心者へのやさしさ 55/100
-
harlan-agent-wait-to-implement
難易度 5/5 1週間以上 初心者へのやさしさ 25/100
-
Dependency Dashboard オープン
難易度 4/5 3〜5日 初心者へのやさしさ 10/100
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
mksglu/context-mode#1200 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
jaegertracing/jaeger-ui#4506 ·
-
area:desktop area:ui bug platform:macos
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
anthropics/claude-code#96687 ·
-
good first issue
難易度 1/5 1時間未満 初心者へのやさしさ 95/100
AOSSIE-Org/DebateAI#582 · コメント 2 件 ·