build-sidebar has error
geeksesi opened this issue · 3 comments
geeksesi commented
hi,
when i try to run this doc.
Building _sidebar.md
(node:2984) UnhandledPromiseRejectionWarning: TypeError: fs.opendirSync is not a function
at getFiles (C:\Users\javad\Documents\public_html\Scripts\Learn-JavaScript\scripts\build-sidebar.js:7:18)
at buildSection (C:\Users\javad\Documents\public_html\Scripts\Learn-JavaScript\scripts\build-sidebar.js:21:23)
at buildSidebar (C:\Users\javad\Documents\public_html\Scripts\Learn-JavaScript\scripts\build-sidebar.js:36:25)
at Object.<anonymous> (C:\Users\javad\Documents\public_html\Scripts\Learn-JavaScript\scripts\build-sidebar.js:44:1)
at Module._compile (internal/modules/cjs/loader.js:936:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:947:10)
at Module.load (internal/modules/cjs/loader.js:790:32)
at Function.Module._load (internal/modules/cjs/loader.js:703:12)
at Function.Module.runMain (internal/modules/cjs/loader.js:999:10)
at internal/main/run_main_module.js:17:11
(node:2984) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 2)
(node:2984) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
npm version : 6.10.3
node version : 12.10.0
windows 10
Swap76 commented
@geeksesi I was also facing the same issue after that one person helped me with it that building _sidebar.md will only get build with Node version 13.0.1 i.e latest
It will be cool if you can add this in Readme.md
geeksesi commented
i did it.
also a problem has in windows cmd ( cmd can't run node ./scripts/build-sidebar.js & docsify serve docs
)
must be use as 2 command