{ parser: "babylon" } is deprecated; we now treat it as { parser: "babel" }.

npm run dev 错误提示:

{ parser: "babylon" } is deprecated; we now treat it as { parser: "babel" }.

 

解决方法:

找到你的工程文件夹里的 YourProName\node_modules\vue-loader\lib\template-compiler\index.js

//将以下代码
if (!isProduction) {
  code = prettier.format(code, { semi: false, parser: 'babylon' })
}
 
//修改为:
 
if (!isProduction) {
  code = prettier.format(code, { semi: false, parser: 'babel' })

posted on 2021-09-06 20:13  静以修身俭以养德  阅读(564)  评论(0编辑  收藏  举报

导航