使用fs.extra copyRecursive给出"TypeError:forEachAsync不是函数".错误,我无法修复 [英] Using fs.extra copyRecursive gives a "TypeError: forEachAsync is not a function" error and I can't fix it

查看:52
本文介绍了使用fs.extra copyRecursive给出"TypeError:forEachAsync不是函数".错误,我无法修复的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的代码是: http://pastebin.com/rCy4wSUK

路由器一旦调用此功能,就会打印将干净的基础内容复制到temp",然后出现以下错误: http://pastebin.com/UxEu4PaS

As soon as this function is called by router it prints "done copying contents of clean base into temp" and then error which is here: http://pastebin.com/UxEu4PaS

因此,至少它在复制时没有给出错误,但是导致它引发此错误的原因.

So at least it is not giving an error in copying but what is causing it to throw this error.

推荐答案

fs.extra模块之类的声音尚未完全安装,并且缺少依赖项.全新的 npm install fs.extra q

Sounds like the fs.extra module has not installed completely and is missing a dependency. Your code runs fine for me with a fresh npm install fs.extra q

删除您的 node_modules 文件夹,然后重新运行 npm install (如果您的依赖项在 package.json 中列出)或 npm安装fs.extra q (如果不是).

Remove your node_modules folder and re-run npm install (if your dependencies are listed in package.json) or npm install fs.extra q (if they are not).

这篇关于使用fs.extra copyRecursive给出"TypeError:forEachAsync不是函数".错误,我无法修复的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆