[筆記] primevue/nuxt-module 升到 Nuxt4 錯誤暫時解法

章節連結

PrimeVue 的 Nuxt module 升版到 Nuxt4 時,啟動時會發生錯誤。其實模組是可正常運作的,但受到 compatibility 尚未修正為 4.0.0 以上的關係,導致無法正常安裝、呼叫而導致錯誤。這邊筆記下暫時解法,然後靜待官方更新了。

notes-primevue4-custom-your-theme-1


內容

打開 node_modules/@primevue/nuxt-module/dist/module.mjs 搜尋 compatibility 會是 { nuxt: “^3.0.0” }。這邊手動改成 { nuxt: “^4.0.0” } 儲存後,再度執行 npm run dev 開啟,就可以了

Due to the upgrade to Nuxt v4, it now shows that @primevue/nuxt-module is incompatible.


參考資料

1. chore: indicate compatibility with Nuxt v4 major

按讚加入粉絲團

延伸閱讀