In Windows environment
$ gitbook serve
If you edit the markdown after execution
Error: EPERM: operation not permitted, lstat [_book directory name]
This is an urgent measure when the gitbook terminates abnormally with the error.
After starting gitbook serve, once you delete the “_book” folder, for some
reason it works normally after that,
[node.js global installation path] /bin/node_modules/gitbook-cli/bin/gitbook.js
If you add a description to delete the “_book” folder, for example, around the 180th to 194th lines of, gitbook serve
will not end abnormally.
- If you are using bash (git bash, etc.) for your shell
program
.command('*')
.description('run a command with a specific gitbook version')
.action(function(commandName){
var args = parsedArgv._.slice(1);
var kwargs = _.omit(parsedArgv, '$0', '_');
runPromise(
manager.ensureAndLoad(bookRoot, program.gitbook)
.then(function(gitbook) {
if(commandName === 'serve'){
setTimeout(function(){
require('child_process').execSync('rm -rf _book');
},1000);
}
return commands.exec(gitbook.commands, commandName, args, kwargs);
})
);
});
- If you are using PowerShell as the shell, make the delete command part as follows
require('child_process').execSync('rm _book -Recurse');
(If you don’t want to make it dependent on the shell, you can delete it with fs.unlink, fs.rmdir, etc.)
Read More:
- PgSQL associated tables perform update to avoid using in query SQL
- Windows: How to Solve PCL C2065 Error
- How to Fix the printer error 0x00000709 on Windows
- The URL is timestamped to avoid caching problems when requesting the current path again
- How to Solve Windows emacs Build lisp slime error
- Windows 7: How to Solve startup error: ERROR 0199
- SRS5.0 Error: srt serve error code=6006 [How to Solve]
- How to Solve VMware Workstation Error: This virtual machine appears to be in use.
- Kill Tomcat process in windows and Linux environment (solve the problem of other ports being occupied)
- Git under Windows reports an error: warning: LF will be replaced by CRLF in ××××.××
- How to Solve Tabbarview error in Column 2021
- Vue: How to Solve Error uncaught (in promise) cancel
- Exception: logstash:: pluginloadingerror when importing MySQL data into es in Windows
- How to Sove Error: listen EADDRINUSE: address already in use 127.0.0.1:8888
- How to Solve elasticSearch8.1.2 Install Error in Win10
- How to Fix NSS error 12190 in curl accessing to HTTPS
- How to Solve Vector Variable Error in sub thread
- How to Fix Node SASS Error in Vue + webpack project after nodejs upgrade
- How to Solve Hmaster hangs up issue due to namenode switching in Ha mode
- How to Solve Fatal error stdatomic in C/C++ Compilation