The following error occurred when executing gitbook init:
Find the prompt path, open the polyfills.js file, and find this function
This function is called on lines 65-67
fs.stat = statFix(fs.stat)
fs.fstat = statFix(fs.fstat)
fs.lstat = statFix(fs.lstat)
Comment out the three lines of code to solve the problem
Because of the NPM version problem, you can refer to the following two methods to solve. However, we must pay attention to which polyfills.js has a problem, which is explained in detail in the error prompt.
Recommended reading:
1 https://blog.csdn.net/yq_ forever/article/details/112121742
https://www.cnblogs.com/cyxroot/p/13754475.html
Read More:
- Typeerror occurred during gitbook installation: cb.apply is not a function
- NPM install error cb.apply is not a function
- Front end project runtime prompts syntax error: typeerror: token.type.endswith is not a function solution
- Uncaught (in promise) TypeError: Object(…) is not a function
- TypeError: this.getOptions is not a function
- Vue Error in v-on handler: “TypeError: path.indexOf is not a function“
- Vue error in mounted hook: “typeerror: object (…) is not a function“
- About iView reporting error in Vue project: error in mounted hook: “typeerror: this$ parent.updateNav is not a function”
- TypeError: connection.connect is not a function
- JS error – typeerror: XXX is not a function
- Using webpack to report typeerror: this.getresolve is not a function
- TypeError: this.getOptions is not a function at Object.lessLoader
- [Solved] jQuery Error: Uncaught TypeError: this.attr is not a function
- In Vue, use echorts to report an error: “typeerror: cannot read property ‘init’ of undefined” error reporting reason and solution
- [react+antd] Table Error: Unhandled Rejection (TypeError): data.slice is not a function
- [Solved] Error handling response: TypeError: self.processResponse is not a function
- Syntax error: typeerror: this.getoptions is not a function an error is reported when the. SCSS file is imported globally
- Webpack error module build failed: typeerror: fileSystem.statSync is not a function
- Common error: uncaught typeerror: document.getElementsByClassName (…).addEventListener is not a function
- Vue — report error with less module build failed: typeerror: loaderContext.getResolve is not a function