GitbookIO/gitbook-cli

gitbook serve error with ENOENT: no such file or directory(fontsettings.js&website.css)

ryotlee opened this issue · 40 comments

environment

  • 1.Windows7
  • 2.CLI version: 2.3.0
  • 3.GitBook version: 3.2.2

when run code gitbook serve or gitbook build ;I've found an error

Error: ENOENT: no such file or directory, stat 'D:\Desktop\gitbooks\testbook_book\gitbook\gitbook-p
lugin-fontsettings\fontsettings.js',
Error: ENOENT: no such file or directory, stat 'D:\Desktop\gitbo
oks\testbook_book\gitbook\gitbook-plugin-fontsettings\website.css'

but when i run with gitbook-v2.0.1 it's ok

gitbook build ./MyGitBook --gitbook=2.0.1

everything is ok

info: loading book configuration....
warn: you should specify a gitbook version to use in your book.json, for example: 2.x.x
info: OK
info: >> 0 plugins loaded
info: start generation with website generator
info: clean website generator
info: OK
info: generation is finished

Done, without error

Same issue

Same issue

zuojj commented

The same issue

ctron commented

Same issue

Same here, starting from 3.0.0.

Same issue !! with GitBook version 3.2.2 on Windows 7

pospi commented

As a workaround, just put module.exports = {} in fontsettings.js. Upon next restart it will be filled out with some generated content.

same issue on windows7.
1.Windows7
2.CLI version: 2.3.2
3.GitBook version: 3.2.3

same~

win10, node 6.11.4, gitbook 3.2.3

Same issue

Same issue

Same issue

remal commented

GitBook 3.2.3. Same issue.

Same issue.

mapxn commented

I got it @everyone .

I turn off my virus-killing software. Then that's OK

mapxn commented

Another way to solve this issue is that:

cd ~/.gitbook/versions/版本/lib/output/website/
vim copyPluginAssets.js
try to delete confirm: ture in the bottom, about line112.

remal commented

@RetP, it doen't help. The issue still occurs.

All in all, I've moved to MkDocs.

~/.gitbook/versions/lib/output/website/copyPluginAssets.js

Line 112

return fs.copyDir(
        assetsFolder,
        assetOutputFolder,
        {
            deleteFirst: false,
            overwrite: true,
            // Edited this line
            confirm: false
        }
    );

helps me :)

Thanks to @RetP !

I got it @everyone .

I turn off my virus-killing software. Then that's OK

thx, i close huorong software, gitbook can build successfully.

remal commented

@RetP My linux CI server doesn't have antivirus software installed. But I've faced the issue. And removing "confirm: true" hasn't helped.

pospi commented

@remal what about OpenVPN or a tunneled network? I wouldn't have thought they'd present an issue, but... I have those. You never know.

remal commented

@pospi I use GitLab CI runner, that executes scripts in Docker containers... I confiured GitLab CI runner to spawn a new VM via docker-machine to run Docker containers.

my md contains special statements such as
{% extends 'base.html.twig' %}
and this error happened

9Echo commented

Another way to solve this issue is that:

cd ~/.gitbook/versions/版本/lib/output/website/
vim copyPluginAssets.js
try to delete confirm: ture in the bottom, about line112.

Thanks!it helps me!!!

Turn off 360 ,火绒 or others security software can solve this problem

关闭杀毒软件 就可以解决这个问题~

I got it @everyone .

I turn off my virus-killing software. Then that's OK

thx so much !!!!!!!!!!!!!!!!!!!!!!!!!!!!

I got it @everyone .

I turn off my virus-killing software. Then that's OK

thx, i close huorong software, gitbook can build successfully.

thx !

关掉360安全卫士就好了

I got it @everyone .

I turn off my virus-killing software. Then that's OK

"turn off virus-killing software", It works.

Audio commented

cd ~/.gitbook/versions/版本/lib/output/website/
vim copyPluginAssets.js
try to delete confirm: ture in the bottom, about line112.

Bug in confirm: true is fixed in cpr@3 (davglass/cpr#57), but gitbook still depends on cpr@1.

Installation of patched cpr using gitbook's npm:

cd ~/.gitbook/versions/3.2.3
npx npm install cpr@3

@Audio it doesnt seem to work :( Thanks though

Another way to solve this issue is that:

cd ~/.gitbook/versions/版本/lib/output/website/
vim copyPluginAssets.js
try to delete confirm: ture in the bottom, about line112.

you make my gitbook works, thx

cd ~/.gitbook/versions/版本/lib/output/website/
vim copyPluginAssets.js
try to delete confirm: ture in the bottom, about line112.

Bug in confirm: true is fixed in cpr@3 (davglass/cpr#57), but gitbook still depends on cpr@1.

Installation of patched cpr using gitbook's npm:

cd ~/.gitbook/versions/3.2.3
npx npm install cpr@3

thx, it works!

same issue

I got it @everyone .

I turn off my virus-killing software. Then that's OK

works for me! thanks

Same error, please fix.

Windows 10 + WSL2 + GitBook 3.2.3

QuAzI commented

cd ~/.gitbook/versions/版本/lib/output/website/
vim copyPluginAssets.js
try to delete confirm: ture in the bottom, about line112.

Bug in confirm: true is fixed in cpr@3 (davglass/cpr#57), but gitbook still depends on cpr@1.

Installation of patched cpr using gitbook's npm:

cd ~/.gitbook/versions/3.2.3
npx npm install cpr@3

this fix helps with fontsettings error but site still not generating. Output directory always empty even if I try real projects like github.com:eucariot/SDSM.git with v3.2.3. v4.0.0-alpha.6 generates empty pages. gitbook update tries to setup v2.6.9 which is also not work

Looks like commercialization kills this project

lucumt commented

Another way to solve this issue is that:

cd ~/.gitbook/versions/版本/lib/output/website/ vim copyPluginAssets.js try to delete confirm: ture in the bottom, about line112.

it works like a charm!