gitbook init出现TypeError: cb.apply is not a function解决办法

简介: cb.apply is not a function

执行 gitbook init 出现如下报错:



找到提示路径,打开 polyfills.js 文件,找到这个函数。



在第 65-67 行调用了这个函数


fs.stat=statFix(fs.stat)
fs.fstat=statFix(fs.fstat)
fs.lstat=statFix(fs.lstat)


把这三行代码注释掉就解决报错了


是因为npm版本的问题,可以参考以下两个方法解决。但一定要注意,是哪个 polyfills.js 出了问题,错误提示里有详细说明。


推荐阅读:

https://blog.csdn.net/yq_forever/article/details/112121742

https://www.cnblogs.com/cyxroot/p/13754475.html

目录
相关文章
|
7月前
TypeError:Joi.validate is not a function 解决办法
TypeError:Joi.validate is not a function 解决办法
|
11月前
|
JavaScript
VUE上传功能本地上传正常,打包上传后报错TypeError: ***.upload.addEventListener is not a function
VUE上传功能本地上传正常,打包上传后报错TypeError: ***.upload.addEventListener is not a function
513 0
|
11月前
react-Native init初始化项目报错”TypeError: cli.init is not a function“
react-Native init初始化项目报错”TypeError: cli.init is not a function“
585 1
|
11天前
|
前端开发
Error in created hook: “TypeError: _test.default is not a function
Error in created hook: “TypeError: _test.default is not a function
|
11天前
|
前端开发
前后端数据交互-----ncaught (in promise) TypeError: this.registerAPI is not a function
前后端数据交互-----ncaught (in promise) TypeError: this.registerAPI is not a function
|
2月前
|
缓存
pytest 运行测试函数报错的解决办法 TypeError: calling <function xxx> returned None, not a test
pytest 运行测试函数报错的解决办法 TypeError: calling <function xxx> returned None, not a test
219 0
|
7月前
|
前端开发 JavaScript
Module build failed: TypeError: this.getResolve is not a function,vue写css时启动出错
Module build failed: TypeError: this.getResolve is not a function,vue写css时启动出错
30 0
|
8月前
Uncaught TypeError: l.push is not a function
Uncaught TypeError: l.push is not a function
|
11月前
|
JavaScript 前端开发
Vue项目部署到服务器时上传报错“Uncaught (in promise) TypeError: s.upload.addEventListener is not a function”
使用vue-admin-element框架进行在本地文件上传以及富文本框中的文件上传是没有问题的,但是在上传部署vue项目到服务器上时,就会报如下图中一个错误。
844 0
|
Dart 前端开发 JavaScript
Syntax Error: TypeError: this.getOptions is not a function
Syntax Error: TypeError: this.getOptions is not a function
482 0
Syntax Error: TypeError: this.getOptions is not a function

热门文章

最新文章