Callback must be a function. Received undefined
fs.js:143
throw new ERR_INVALID_CALLBACK(cb);
^ TypeError [ERR_INVALID_CALLBACK]: Callback must be a function. Received undefined
at makeCallback (fs.js:143:11)
at Object.unlink (fs.js:1024:14)
at D:\node\littleAlbum\controller\router.js:88:16
at IncomingForm.<anonymous> (D:\node\littleAlbum\node_modules\formidable\lib\incoming_form.js:107:9)
at IncomingForm.emit (events.js:210:5)
at IncomingForm._maybeEnd (D:\node\littleAlbum\node_modules\formidable\lib\incoming_form.js:557:8)
at D:\node\littleAlbum\node_modules\formidable\lib\incoming_form.js:238:12
at WriteStream.<anonymous> (D:\node\littleAlbum\node_modules\formidable\lib\file.js:79:5)
at Object.onceWrapper (events.js:299:28)
at WriteStream.emit (events.js:210:5) {
code: 'ERR_INVALID_CALLBACK'
}

原因:

正确应该为:

Callback must be a function. Received undefined的更多相关文章
- jquery源码中的(function(window, undefined){})(window)【转】
(function( window, undefined ) {})(window);这个,为什么要将window和undefined作为参数传给它? (function( $, undefined ...
- JS 关于(function( window, undefined ) {})(window)写法的理解
JS 关于(function( window, undefined ) {})(window)写法的理解 [网络整理] (function( window, undefined ) {})(windo ...
- Error: [ng:areq] Argument 'xxxx' is not a function, got undefined
"Error: [ng:areq] Argument 'keywords' is not a function, got undefined" 代码类似这样的: <div n ...
- Argument 'xxx' is not a function, got undefined,初学Angular的第一个坑
终于考完试了,在没更新的这一段时间里,一直都在忙于应付考试.不过在期间也是接触到不少好玩的东西,比如Html5的Canvas,我用lufylegend的Html5引擎做了个<看你有所色>的 ...
- 关于jQuery源码中(function(window,undefined){//dosomething()})(window)写法解释
一.首先是最常见的闭包 (Closure) 范式自执行函数的写法,这里用匿名函数封装(构造块级作用域),避免了匿名函数内部的代码与外部之间发生冲突(如使用了相同的变量名). (function() { ...
- jQuery 1.4.4 中 function( window, undefined ) 写法原因
读 jQuery 1.4.4 版本代码的时候,发现下面的写法: (function( window, undefined ) { ... // code goes here })(window); w ...
- 关于 jQuery中 function( window, undefined ) 写法的原因
今天在读 jQuery 源码的时候,发现下面的写法: (function(window,undefined){ ...// code goes here })(window); window 作为参数 ...
- jquery 中 (function( window, undefined ) {})(window)写法详解(转)
最常见的闭包 (Closure) 范式大家都很熟悉了: 123 (function() {// ...})(); 很简单,大家都在用.但是,我们需要了解更多.首先,闭包是一个匿名函数 (Anonymo ...
- ;(function( $, window, undefined ){ }(jQuery,window))为何需要往里面传$,window,undefined这些参数
(function( $, jQuery , undefined ) {})(jQuery); 为什么要将window和undefined作为参数传给它? 因为 ecmascript 执行JS代码是从 ...
随机推荐
- mysql免安装版配置和一些常见问题
博客原文点我 今天在Windows Server 2003下安装mysql,遇到不少问题.之前在另外两台服务器安装的时候也遇到了几个问题,最后找到不少文章解决了,记录一下. 所有版本都是免安装的32和 ...
- python的sort和sorted
sort 只适用于列表,返回列表类型. sorted 可适用于字典,元组和列表. 使用方法 sort的使用方法是list.sort(cmp=None, key=None, reverse=False) ...
- 安全组与网络ACL
通过配置网络ACL和安全组策略,保障VPC内的弹性云服务器安全使用. 安全组对弹性云服务器进行防护:设置不同安全组访问规则实现系统访问控制 网络ACL对子网进行防护:可实现网络区域访问控制
- discuz x3.3标题的最少字数限制设置方法
Discuz帖子标题默认字数最多是80个字节,却没有最少的字节限制.最近看到很多站长想限制一下帖子标题最少字数,不管是利于seo,还是禁止灌水,都有必要.为此把设置方法发上来分享. 1.找到并打开st ...
- 前端重定向,index.html文件被浏览器缓存,导致整个应用都是旧的
解决方法:https://github.com/ant-design/ant-design-pro/issues/1365#issuecomment-384496088
- 转载于山边小溪的博客--编写跨浏览器兼容的 CSS 代码的金科玉律
http://www.cnblogs.com/lhb25/archive/2010/06/19/1760786.html 原始网页 作为 Web 设计师,你的网站在各种浏览器中有完全一样的表现是很 ...
- Simple Redux
This is a post that tries to explain the the basics of Redux. We’ll build a minimal working example ...
- spark学习收集
spark优化: http://www.cnblogs.com/hark0623/p/5533803.html 董西成学生写的经验分享(很详细很强大) spark官网 API http://spark ...
- github Actions 使用方法
http://www.ruanyifeng.com/blog/2019/09/getting-started-with-github-actions.html Actions 是github提供的持续 ...
- <转>python列表、元组、集合、字典、json相互转换以及其他基础入门
列表元组转其他 # 列表转集合(去重) list1 = [6, 7, 7, 8, 8, 9] set(list1) # {6, 7, 8, 9} #两个列表转字典 list1 = ['key1','k ...