您当前的位置: 首页 > 

彭世瑜

暂无认证

  • 4浏览

    0关注

    2791博文

    0收益

  • 0浏览

    0点赞

    0打赏

    0留言

私信
关注
热门博文

[@vue/compiler-sfc] the >>> and /deep/ combinators have been deprecated. Use :deep() instead.

彭世瑜 发布时间:2022-08-17 11:32:02 ,浏览量:4

Vue2的项目中,控制台报错

[@vue/compiler-sfc] the >>> and /deep/ combinators have been deprecated. Use :deep() instead.

原因是 package.json 中没有锁定Vue的版本

{
  "dependencies": {
    "vue": "^2.6.10"
  } 
}

node_modules 装的却是这个版本:

"version": "2.7.4"

修改如下,重新安装

{
  "dependencies": {
    "vue": "2.6.10"
  } 
}

版本号的匹配规则:

2.6.10 只匹配 2.6.10
^2.6.10 会匹配小版本 "2.x.x" eg: 2.6.10、2.7.0
~2.6.10 会匹配大版本 "2.6.x" eg: 2.6.10、2.6.0

参考 【总结】1361- package.json 与 package-lock.json 的关系

关注
打赏
1665367115
查看更多评论
立即登录/注册

微信扫码登录

0.0561s