help: plugin breaks devTools
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 35/100
- issue の種類
- バグ
- 明瞭さ
- 説明が足りない
- 活発さ
- 停滞
- 技術スタック
- nuxt
調査の方向性
まず、示されている async defineNuxtPlugin と CMS ストア呼び出しを使って Nuxt v3 から v4 へのアップグレードを再現し、composable エラーが発生したときの devTools の起動経路を調査します。完了の条件は、報告された Nuxt-instance エラーなしに、プラグインが初期設定とナビゲーションを取得できた状態で devTools が読み込まれることです。
索引モデルが issue の本文から書いたものです。
説明
📚 What are you trying to do?
I have a project I'm upgrading from Nuxt v3 to v4. My app requires plugins that make the call to the CMS for intiial settings and Data etc. When I add my plugin
/* get global page data on start */
export default defineNuxtPlugin(async (nuxtApp) => {
const siteSettingsStore = useSiteSettingsStore();
await siteSettingsStore.fetchStoreSettings();
const siteNavigation = useSiteNavigationStore();
await siteNavigation.fetchStoreNavigation();
// Add all the stores to the Nuxt context
nuxtApp.provide("siteSettingsStore", siteSettingsStore);
nuxtApp.provide("siteNavigation", siteNavigation);
});
to the app devTools is no longer available...
🔍 What have you tried?
Any change I make to the plugin code, namely adding app:created hook, or removing the async/await results the following error
"A composable that requires access to the Nuxt instance was called outside of a plugin, Nuxt hook, Nuxt middleware, or Vue setup function."
ℹ️ Additional context
I also get the following error in the browser console.
"The resource http://localhost:3000/_nuxt/builds/meta/dev.json was preloaded using link preload but not used within a few seconds from the window's load event. Please make sure it has an appropriate as value and it is preloaded intentionally."
- 主要言語
- TypeScript
- スター
- 3.3k
- フォーク
- 214
- 平均マージ
- 19時間 45分
- マージ済み PR(30日)
- 12
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
nuxt/devtools のほかの issue
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
-
bug
難易度 3/5 1〜2日 初心者へのやさしさ 68/100
-
enhancement
難易度 5/5 1週間以上 初心者へのやさしさ 25/100
-
bug needs reproduction
難易度 4/5 3〜5日 初心者へのやさしさ 38/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 件 ·