项目报错 TypeError: loaderContext.getOptions is not a function

发布时间:2023-03-31 08:00

复现步骤

启动命令 yarn run serve
出现 TypeError: loaderContext.getOptions is not a function 报错

解决方案

一番查找,发现了 @vue/cli-plugin-typescript 包有更新,于是降低这个包版本。

// 查看此包的历史版本
npm view @vue/cli-plugin-typescript version 
// 安装旧版本包
npm @vue/cli-plugin-typescript@4.5.15 -i -D
yarn add @vue/cli-plugin-typescript@4.5.15 --dev

ItVuer - 免责声明 - 关于我们 - 联系我们

本网站信息来源于互联网,如有侵权请联系:561261067@qq.com

桂ICP备16001015号