最新消息:20210917 已从crifan.com换到crifan.org

【已解决】Mac中卸载gitbook和重新安装gitbook

Mac crifan 1338浏览 0评论
折腾:
【未解决】gitbook install报错:TypeError Cannot set property readableListening of undefined
期间,去Mac中卸载现有有问题的gitbook,重新安装gitbook,希望可以正常install插件。
gitbook-cli 安装
gitbook-cli 安装 crifan.org
Gitbook命令安装 · Gitbook使用入门
$ npm install gitbook-cli -g
安装 | GitBook 简明教程
【记录】Mac本地搭建Gitbook环境 – 在路上
【记录】gitbook升级到新版本 – 在路上
npm install gitbook-cli -g
先去卸载:
~  npm uninstall gitbook-cli -g


removed 1191 packages, and audited 1 package in 3s


found 0 vulnerabilities
再去安装:
 ~  npm install gitbook-cli -g


added 21 packages in 4s
注意到,之前已有1191个插件,重新安装,只有21个插件。。。
【规避解决】gitbook install时能否指定node_modules的安装路径 – 在路上
~  npm install gitbook -g
npm WARN deprecated node-uuid@1.4.8: Use uuid module instead
npm WARN deprecated datauri@0.2.1: Datauri 2.0 released. See more in https://github.com/data-uri/datauri/releases/tag/v2.0.0
npm WARN deprecated cryptiles@0.2.2: This version has been deprecated in accordance with the hapi support policy (hapi.im/support). Please upgrade to the latest version to get the best features, bug fixes, and security patches. If you are unable to upgrade at this time, paid support is available for older versions (hapi.im/commercial).
npm WARN deprecated sntp@0.2.4: This module moved to @hapi/sntp. Please make sure to switch over as this distribution is no longer supported and may contain bugs and critical security issues.
npm WARN deprecated hoek@0.9.1: This version has been deprecated in accordance with the hapi support policy (hapi.im/support). Please upgrade to the latest version to get the best features, bug fixes, and security patches. If you are unable to upgrade at this time, paid support is available for older versions (hapi.im/commercial).
npm WARN deprecated boom@0.4.2: This version has been deprecated in accordance with the hapi support policy (hapi.im/support). Please upgrade to the latest version to get the best features, bug fixes, and security patches. If you are unable to upgrade at this time, paid support is available for older versions (hapi.im/commercial).
npm WARN deprecated hawk@1.1.1: This module moved to @hapi/hawk. Please make sure to switch over as this distribution is no longer supported and may contain bugs and critical security issues.
npm WARN deprecated sprintf@0.1.5: The sprintf package is deprecated in favor of sprintf-js.
npm WARN deprecated minimatch@0.2.14: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
npm WARN deprecated minimatch@2.0.10: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
npm WARN deprecated fsevents@0.3.8: "Please update to latest v2.3 or v2.2"
npm WARN deprecated highlight.js@8.8.0: Version no longer supported. Upgrade to @latest
npm WARN deprecated nunjucks@2.2.0: potential XSS vulnerability in autoescape mode, and with escape filter was fixed in v2.4.3
npm WARN deprecated graceful-fs@3.0.5: please upgrade to graceful-fs 4 for compatibility with current and future versions of Node.js
npm WARN deprecated chokidar@1.0.6: Chokidar 2 will break on node v14+. Upgrade to chokidar 3 with 15x less dependencies.


added 260 packages in 19s
不过算了,也去卸载
 ~  npm uninstall gitbook gitbook-cli -g


removed 965 packages, and audited 1 package in 3s


found 0 vulnerabilities
都重新安装:
~  npm install -g gitbook gitbook-cli
npm WARN deprecated sprintf@0.1.5: The sprintf package is deprecated in favor of sprintf-js.
npm WARN deprecated minimatch@2.0.10: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
npm WARN deprecated cryptiles@0.2.2: This version has been deprecated in accordance with the hapi support policy (hapi.im/support). Please upgrade to the latest version to get the best features, bug fixes, and security patches. If you are unable to upgrade at this time, paid support is available for older versions (hapi.im/commercial).
npm WARN deprecated graceful-fs@3.0.5: please upgrade to graceful-fs 4 for compatibility with current and future versions of Node.js
npm WARN deprecated chokidar@1.0.6: Chokidar 2 will break on node v14+. Upgrade to chokidar 3 with 15x less dependencies.
npm WARN deprecated datauri@0.2.1: Datauri 2.0 released. See more in https://github.com/data-uri/datauri/releases/tag/v2.0.0
npm WARN deprecated boom@0.4.2: This version has been deprecated in accordance with the hapi support policy (hapi.im/support). Please upgrade to the latest version to get the best features, bug fixes, and security patches. If you are unable to upgrade at this time, paid support is available for older versions (hapi.im/commercial).
npm WARN deprecated sntp@0.2.4: This module moved to @hapi/sntp. Please make sure to switch over as this distribution is no longer supported and may contain bugs and critical security issues.
npm WARN deprecated minimatch@0.2.14: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
npm WARN deprecated fsevents@0.3.8: "Please update to latest v2.3 or v2.2"
npm WARN deprecated hoek@0.9.1: This version has been deprecated in accordance with the hapi support policy (hapi.im/support). Please upgrade to the latest version to get the best features, bug fixes, and security patches. If you are unable to upgrade at this time, paid support is available for older versions (hapi.im/commercial).
npm WARN deprecated node-uuid@1.4.8: Use uuid module instead
npm WARN deprecated hawk@1.1.1: This module moved to @hapi/hawk. Please make sure to switch over as this distribution is no longer supported and may contain bugs and critical security issues.
npm WARN deprecated nunjucks@2.2.0: potential XSS vulnerability in autoescape mode, and with escape filter was fixed in v2.4.3
npm WARN deprecated highlight.js@8.8.0: Version no longer supported. Upgrade to @latest


added 281 packages in 13s
然后看看:
~  gitbook -V
You need to install "gitbook-cli" to have access to the gitbook command anywhere on your system.
If you've installed this package globally, you need to uninstall it.
>> Run "npm uninstall -g gitbook" then "npm install -g gitbook-cli"
 
 xxx@xxx  ~  npm uninstall -g gitbook

removed 387 packages, and audited 1 package in 1s

found 0 vulnerabilities
 xxx@xxx  ~  npm install -g gitbook-cli

changed 46 packages in 5s
再去:
~  gitbook -V
CLI version: 2.3.2
GitBook version: 3.2.3
貌似正常了。
【总结】
卸载和重新安装gitbook:
npm uninstall -g gitbook gitbook-cli
npm install -g gitbook-cli
确认已安装:
 gitbook -V
CLI version: 2.3.2
GitBook version: 3.2.3
【后记20210122】
重新卸载和重新安装试试:
【已解决】Mac中彻底卸载和重新安装gitbook
最后是:
只需要:
npm install -g gitbook-cli
即可。

转载请注明:在路上 » 【已解决】Mac中卸载gitbook和重新安装gitbook

发表我的评论
取消评论

表情

Hi,您需要填写昵称和邮箱!

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址
92 queries in 0.185 seconds, using 23.39MB memory