最近踩坑nuxt3時發現無法與3.0官網中那樣,在components中創建base/foo/button.vue組件,然後自動引入時報錯,網上搜索也無果...
後來實屬無奈,病急亂投醫升級了版本,得出解決:
npx nuxi upgrade
執行後顯示如下:
ℹ Upgraded nuxt version: 3.0.0-27447086.6c083f3 19:45:40
✔ Successfully upgraded nuxt from 3.0.0-27430570.4cfad4d to 3.0.0-27447086.6c083f3 19:45:40
ℹ Changelog: https://github.com/nuxt/framework/compare/4cfad4d...6c083f3
我的版本從.30570升級到了47086,隨後重啓後自動引入的button.vue組件已經顯示