通过命令行查询可用的包的版本号: npm view vuex versions –json
PS F:\学习\Vue\vue_stu> npm view vuex versions --json
[
"0.1.0",
"0.2.0",
"0.3.0",
"0.4.0",
"0.4.1",
"0.4.2",
"0.5.0",
"0.5.1",
"0.6.1",
"0.6.2",
"0.6.3",
"0.7.0",
"0.7.1",
"0.8.0",
"0.8.1",
"0.8.2",
"1.0.0-rc",
"1.0.0-rc.2",
"1.0.0",
"1.0.1",
"2.0.0-rc.1",
"2.0.0-rc.3",
"2.0.0-rc.4",
"2.0.0-rc.5",
"2.0.0-rc.6",
"2.0.0",
"2.1.0",
"2.1.1",
"2.1.2",
"2.1.3",
"2.2.0",
"2.2.1",
"2.3.0",
"2.3.1",
"2.4.0",
"2.4.1",
"2.5.0",
"3.0.0",
"3.0.1",
"3.1.0",
"3.1.1",
"3.1.2",
"3.1.3",
"3.2.0",
"3.3.0",
"3.4.0",
"3.5.0",
"3.5.1",
"3.6.0",
"3.6.1",
"3.6.2",
"4.0.0-alpha.1",
"4.0.0-beta.1",
"4.0.0-beta.2",
"4.0.0-beta.3",
"4.0.0-beta.4",
"4.0.0-rc.1",
"4.0.0-rc.2",
"4.0.0"
]
选择合适版本,并使用以下命令安装:
npm install -g vuex@4.0.0
PS F:\学习\Vue\vue_stu> npm install -g vuex@4.0.0
npm WARN vuex@4.0.0 requires a peer of vue@^3.0.2 but none is installed. You must install peer dependencies yourself.
+ vuex@4.0.0
added 1 package from 1 contributor in 2.531s
版权声明:本文为noeal原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。