-
Notifications
You must be signed in to change notification settings - Fork 3.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
git serve can't restart when file changes #1379
Comments
I'm experiencing the same issue, though the error message is slightly different:
Node: 4.4.5 |
I have the same problem
|
md file changed, operation not permitted |
I meet tooooooo!! |
Having this problem too.
|
Same problem:
|
Same issue here.
I'm not sure why it is trying to access the README.md even the file is available? |
same issue, EPERM on mkdir operation, windows 10 |
I have same issue with Windows 10. While waiting for this issue get resolved, I've created // gulpfile.js
var browserSync = require('browser-sync');
var gulp = require('gulp')
var run = require('gulp-run')
gulp.task('browser-sync', function() {
browserSync({
server: {
baseDir: "./docs/_book"
}
});
});
gulp.task('build-doc', function () {
run('npm run docs:build').exec('', function() {
run('echo docs:build DONE!').exec().pipe(browserSync.reload({stream:true}));
});
})
gulp.task('watch', function() {
gulp.watch('./docs/**/*.md', ['build-doc']);
})
gulp.task('default', ['build-doc', 'browser-sync', 'watch']); // package.json
"scripts": {
"docs:build": "cd docs && gitbook build",
... Maybe this could help someone life. Or any better idea? UPDATE |
Same problem as #1309? |
I have a branch on a public repository where I see this problem every time any file is updated: https://github.com/mlidbom/AsciiDocScratch/tree/gitbook-serve-bug-repro Hope this might help with tracking down the problem. |
In Windows 10, the problem gone when I run I'm using these versions:
|
To budiadiono: Gitbook CLI version: 2.3.0 |
Hi @budiadiono , my git version is 2.9.2 for windows. |
Last Friday it worked normally, and today it failed again. |
I see this issue on Windows also. I have seen some threads related to grunt that say you can avoid the problem by running the CMD window as administrator. I am not a big fan of that solution but it may work for some. |
+1 fails quite often, Windows 7 |
+1 fails quite often, Windows 10 |
any update? |
Same for me, I see this error everytime I save a file. I'm using
|
Same problem.
|
I suppose issue relates to weird inability to change read-only flag on folder in Windows
|
same, windows 7 |
any solutions? this really bother me a lot. I have to go back to my Ubuntu again... |
the old version 2.6.7 can live relaod on win10
|
I'd like to add another mee too. This is keeping us from starting with Gitbook at all, because the majority of our authors is on Windows and the local server crashes on every single change. |
Here's a solution
|
@creatop-john Thanks, it solved my problem! |
For us, the issue turned out to be a blank .md file, after inserting dummy data in it, gitbook serve worked properly. |
@creatop-john Thank you for running successfully, but the refresh is too slow to affect the writing experience. |
@creatop-john Thank you for running successfully |
I am still seeing problems with this: Windows 7 SP1 64-bit Starting from scratch this is what I did: When I saved a change to README.md it breaks. See below.
|
I'll dogpile in as well, just curious what the status of this is. |
I had the same issue but noticed that my SUMMARY.md didn't include all the links to pages I was trying to access. Once I added them I was able update files and have the "gitbook serve" restart successfully. Might not be the same issue you all are seeing just wanted to point that out. |
Same here . While @creatop-john 's solution worked at first, when using chapters I am unable to delete the /book even though I have full admin privileges. |
Two years past, the bug is still here, what have happened?! |
really |
Same error, Anyone have new solution? |
I have same issue also. I tried the steps below, and I could see that they would be reloaded without problems. run gitbook serve
on another terminal
modify & save some files then, reload & livereload work well.
|
This is unfortunately only a temporary solution @mulder21c |
Win10 64bit |
Maybe someone need: alternative solution for this, vuepress, new, easy to use, more powerful and well maintained |
I still have the same error, with none of the solutions working.. Is there an official solution to this it's blocking me from using gitbook :( e/ Running |
Solution by @mulder21c works, but needs to be done every time the server is started. |
It works for me and well. @mulder21c
|
It's seems like that the only way is to add virtual data,hope others can deal it. |
I modified the I hope this will help those who are having problems like me. modify the var Server = require('./server');
var watch = require('./watch');
// load fs, path module
var fs = require('fs');
var path = require('path');
...
.then(function() {
if (!hasWatch) {
return waitForCtrlC();
}
return watch(book.getRoot())
.then(function(filepath) {
// set livereload path
lrPath = filepath;
console.log('Restart after change in file', filepath);
console.log('');
// add this scripts
fs.readdir(outputFolder, (err, files) => {
for (const file of files) {
fs.unlink(path.join(outputFolder, file), err => {});
}
});
return generateBook(args, kwargs);
});
}); |
unkonwn reason in win10, but i find we need to keep the built file directory in a service state. example:
you will find the problem is solved; thanks for @lguoliang @JaydenShumwin10/win8 |
I built
gitbook serve
success, but when I change file the gitbook serve restart fail.Here is the error message.
node version:4.4.2
gitook version: 2.2.0
The text was updated successfully, but these errors were encountered: