经典错误之:TypeError: res.json is not a function
2018-01-14 17:11
621 查看
今天在用nodejs开发项目是遇到了如下错误:
WHY?
然后我花了一个多小时去找bug,各种数据,各种手段,各种方法都使尽了,想哭
然后上网查,网上有的是下面的代码中有与res重名的,当时没注意,后面又把自己的代码看了一遍,才发现真的有一个重名的变量!!!!经过修改,一切OK!!!哎!!!谁让我经常用res当变脸呢。。。
WHY?
然后我花了一个多小时去找bug,各种数据,各种手段,各种方法都使尽了,想哭
然后上网查,网上有的是下面的代码中有与res重名的,当时没注意,后面又把自己的代码看了一遍,才发现真的有一个重名的变量!!!!经过修改,一切OK!!!哎!!!谁让我经常用res当变脸呢。。。
相关文章推荐
- javascript 错误 "Uncaught TypeError: string is not a function"
- 使用vue时Module build failed: TypeError: this._init is not a function错误的解决方法
- Controller中错误 TypeError: $rootScope.$broadcast is not a function
- javascript 错误 "Uncaught TypeError: string is not a function"
- 出现TypeError: 'undefined' is not a function (evaluating '$')错误
- Meteor错误:TypeError: Meteor.userId is not a function
- jquery中Uncaught TypeError: $(...).ajaxUpload is not a function(…)错误解决方法
- js错误:Uncaught TypeError: accept is not a function at HTMLInputElement.onclick
- TypeError: a.replace is not a function 错误
- TypeError: s[y] is not a function 表单提交错误
- JS监听事件错误:Uncaught TypeError: xx(函数名)is not a function at HTMLInputElement.onclick
- js错误Uncaught TypeError: $(...).datagrid is not a function自己写的并没有错但是一直报这个错(详解)
- 错误提示:Uncaught TypeError: xxxxx(此处为要调用的函数) is not a function
- 关于Jquery错误的解决:Uncaught TypeError: $.post is not a function
- 海康web视频插件错误:TypeError: c.HWP_GetLocalConfig is not a function
- jquery TypeError: 'undefined' is not a function (evaluating 'elem.nodeName.toLowerCase()') [jquery.js:1904]错误原因
- TypeError: url.indexOf is not a function ,使用jquery load()出现错误
- node.js开发错误——TypeError: req.flash is not a function
- TypeError: $.cookie is not a function解决方案
- Uncaught TypeError: sum is not a function