Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

请锁定依赖的vue版本 #681

Closed
transtone opened this issue Sep 23, 2021 · 5 comments
Closed

请锁定依赖的vue版本 #681

transtone opened this issue Sep 23, 2021 · 5 comments
Assignees

Comments

@transtone
Copy link

transtone commented Sep 23, 2021

问题描述

"@nutui/nutui-taro@3.1.6":
  version "3.1.6"
  resolved "https://registry.nlark.com/@nutui/nutui-taro/download/@nutui/nutui-taro-3.1.6.tgz#901d2d099eb53b61abecb5c476a35750026cdc0e"
  integrity sha1-kB0tCZ61O2Gr7LXEdqNXUAJs3A4=
  dependencies:
    pinyin "^2.10.2"
    sass "^1.34.0"
    vue "^3.0.5"
    vue-router "^4.0.4"


vue@^3.0.5:
  version "3.2.14"
  resolved "https://registry.npmmirror.com/vue/download/vue-3.2.14.tgz?cache=0&sync_timestamp=1632350697107&other_urls=https%3A%2F%2Fregistry.npmmirror.com%2Fvue%2Fdownload%2Fvue-3.2.14.tgz#da577433fb74f328ed58255c728a6a1bf196d337"
  integrity sha1-2ld0M/t08yjtWCVccopqG/GW0zc=
  dependencies:
    "@vue/compiler-dom" "3.2.14"
    "@vue/compiler-sfc" "3.2.14"
    "@vue/runtime-dom" "3.2.14"
    "@vue/server-renderer" "3.2.14"
    "@vue/shared" "3.2.14"

taro 会依赖安装 vue,而又不锁定版本,导致vue会自动安装 vue-3.2.14版本,这个版本有这个问题:
vuejs/core#4344

小程序下面会报错
aef0c8df1db7d5ae7f3efaddc0ab0a1

@transtone transtone changed the title 请锁定vue依赖 请锁定依赖的vue版本 Sep 23, 2021
@richard1015
Copy link
Member

感谢反馈,我们跟进一下

@transtone
Copy link
Author

感谢反馈,我们跟进一下

    sass "^1.34.0"
    vue "^3.0.5"
    vue-router "^4.0.4"

这三个依赖都可以放到 devDependencies 里去,用户自己的框架肯定会装。

@willove
Copy link

willove commented Sep 26, 2021

自己的项目的package.json里的vue版本保持和nutui项目里的配置vue版本依赖一样就可以了,这个问题基本上就是你自己项目里用的vue和nutui用的vue版本不一样造成的。

@richard1015 richard1015 self-assigned this Sep 27, 2021
@transtone
Copy link
Author

自己的项目的package.json里的vue版本保持和nutui项目里的配置vue版本依赖一样就可以了,这个问题基本上就是你自己项目里用的vue和nutui用的vue版本不一样造成的。

项目需要用到 vue-3.2 的新特性。taro不会锁定 vue-3.0 不升级了吧。

@transtone
Copy link
Author

transtone commented Oct 6, 2021

3.1.7 依赖已调整。

但即便官方依赖更新到了 vue-3.2.19,仍然在微信小程序中报错。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants