Error: enoent: no such file or directory, stat ‘/ usr / local / var / www / /_ book/gitbook/git

Every time a gitbook is edited, there will be an error that causes the service that has been started through gitbook serve to stop. The error message is: error: enoent: no such file or directory, stat ‘/ usr/local/var/www//_ book/gitbook/gitbook-plugin-livereload/ plugin.js ‘

The background is that a new gitbook has been installed. Every time I edit the MD file in the project, I will hold the above error. As a result, the service I started through gitbook serve will stop and I can’t browse the edited gitbook normally

At the beginning, I didn’t care when I reported the error. The back office revised and edited the file several times, and found that the gitbook service would stop and report the above error after each modification. I found that this was not a mistake in my operation, but a problem with gitbok. After looking for the problem for a while, I didn’t have any idea, so I Baidu found out the bug in gitbook itself, The original configuration of gitbook is wrong. The specific modification method is as follows:

1. Find the configuration file address of gitbook (MAC system) in the user directory: Cd ~ to jump to the user directory of the current user

2. Find ~ /. Gitbook/versions/3.2.3/lib/output/website/ copyPluginAssets.js File, and then find all the confirm configuration items in this file (a total of 2 places), and change the original value of true to false

confirm: false

There are two places in total. Just change them


Read More: