简体   繁体   English

npm软件包切换版本?

[英]npm package toggle version?

Installed the gitbook and gitbook-cli modules, because of an incompatibility problem, multiple versions are installed, how to switch the package version of the module ? 安装了gitbook和gitbook-cli模块,由于不兼容的问题,安装了多个版本,如何切换模块的软件包版本?

demo: 演示:

$ gitbook ls GitBook Versions Installed: * 3.2.3 3.1.1 3.1.0 3.0.3 3.0.0 2.6.7 2.6.6 2.6.4 2.5.0 2.3.2 2.1.0 2.0.0 Run "gitbook update" to update to the latest version.

在此处输入图片说明

According to Documentation, 根据文档,

By default, GitBook CLI will read the gitbook version to use from the book configuration, but you can force a specific version using --gitbook option: 默认情况下,GitBook CLI将从书籍配置中读取要使用的gitbook版本,但是您可以使用--gitbook选项强制使用特定版本:

$ gitbook build ./mybook --gitbook=2.0.1

Therefore change the book config version to the required version or use the above line to force the build. 因此,将书籍配置版本更改为所需的版本,或使用以上代码行强制构建。

If you do not need a particular version just uninstall it. 如果您不需要特定版本,只需将其卸载即可。

$ gitbook uninstall 2.0.1

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM