Jevon617 / unplugin-svg-component

generate a vue/react component through svg files, supporting svg file HMR, Tree-shaking, SSR and TS hint.
MIT License
58 stars 5 forks source link

Cannot find module '@vue/compiler-sfc@3.x.x'. #20

Closed 2815261401 closed 5 months ago

2815261401 commented 5 months ago

image throw new Error(Cannot find module '@vue/compiler-sfc@${vueVerison.slice(-1)}.x.x'. Please install it.); ^ Error: Cannot find module '@vue/compiler-sfc@3.x.x'. Please install it. 需要自己安装@vue/compiler-sfc不然报以上错误

2815261401 commented 5 months ago

0.8.0版本没有这个问题

Jevon617 commented 5 months ago

@2815261401 你的安装策略是否开启了自动安装 peerDependencies?

2815261401 commented 5 months ago

没有,就是普通的pnpm i

Jevon617 commented 5 months ago

@2815261401 发布了最新版本, 目前如果你的vue版本大于3.2.13 或者是 2.7.x不会提示错误, 否则就需要自己装一下 @vue/compiler-sfc.

2815261401 commented 5 months ago

可以了