腾讯云
开发者社区
文档
建议反馈
控制台
首页
学习
活动
专区
工具
TVP
最新优惠活动
文章/答案/技术大牛
搜索
搜索
关闭
发布
登录/注册
精选内容/技术社群/优惠产品,
尽在小程序
立即前往
文章
问答
(1020)
视频
沙龙
1
回答
错误
:
Route.get
()需
要回
调
函数
,
但
获得了
[
object
String
]
node.js
、
express
也许,我的
错误
可能是显而易见的,但我一直在努力解决这个问题。如果你能说出哪里出了问题,我将不胜感激。
浏览 27
提问于2021-02-25
得票数 1
回答已采纳
2
回答
错误
:
Route.get
()需
要回
调
函数
,
但
获得了
[
object
Undefined]
javascript
、
node.js
、
routes
我已经搜索过类似的
错误
,并尝试实现这些
错误
的版本,
但
都没有成功。根据
错误
,这些是产生
错误
的文件。 另请注意,当我删除list
函数
的代码时。只要使用create
函数
,一切都可以正常工作。但是,只要我再次添加list
函数
,它就会中断,并给出Return.get()需
要回
调
的
错误
。但是得到了一个未定义的对象。
浏览 0
提问于2015-05-20
得票数 0
4
回答
nodejs
Route.get
()需
要回
调
函数
,
但
得到了[
object
String
]
javascript
、
node.js
、
express
我开始使用nodejs和express进行编码。因此,我在我的文件test.js中执行了此操作,该文件位于我的文件夹routes中: res.send(`I'm a test`);然后,在我的server.js中: const test = require(
浏览 25
提问于2017-03-14
得票数 0
1
回答
如何解决此
错误
:
Route.get
()需
要回
调
函数
,
但
获得了
[
object
Undefined]
node.js
、
jwt
、
passport.js
、
angular-social-login
我定义了这个
函数
: // /middleware/authMiddleware.js const momentreq, res) => {}); module.exports = router; 我得到了
错误
Route.get
() requires a
浏览 73
提问于2020-06-18
得票数 1
2
回答
错误
:
Route.get
()需
要回
调
函数
,
但
获得了
[
object
Object
]。使用Chai测试router+res.render
函数
javascript
、
node.js
、
testing
、
routes
、
chai
then(function() { });}); 1) home route Error:
Route.get
() requires a callbackfunction but got a [
object
Object
] at Route.at proce
浏览 2
提问于2020-05-02
得票数 0
1
回答
Route.post()需
要回
调
函数
,
但
获得了
[
object
String
]
javascript
、
node.js
、
express
MDN教程运行得很好,
但
mines不起作用。以下是
错误
: at Route._compile (module.js:652:30) }); }我认为创建post控制器是数组,所以我得到了
错误
,但
浏览 4
提问于2018-09-19
得票数 1
1
回答
Route.post()需
要回
调
函数
,
但
获得了
[
object
Object
]
node.js
、
express
、
backend
、
middleware
我在express中链接到我的路由处理程序的自定义中间件
函数
,但我得到了上面的(标题)
错误
。为什么会这样呢?require("joi"); const schema = { password: Joi.
string
() .max(255) .required(
浏览 35
提问于2019-01-03
得票数 0
1
回答
错误
: Route.delete()需
要回
调
函数
,
但
获得了
[
object
Undefined]
node.js
、
mongodb
“在user.controller中,我将此方法放入” User.findByIdAndRemove(req.params.id) if (!user) { message: "User not found ", } res.send({ message: "User deleted
浏览 19
提问于2021-05-12
得票数 1
1
回答
错误
: Route.post()需
要回
调
函数
,
但
获得了
[
object
Undefined]
mongodb
、
express
、
mongoose
有一个回
调
,我不知道为什么这不能工作……我有一个可用的用户系统,基本上我只是复制了那个系统。我不知道为什么一个可以工作,另一个不能工作。出于懒惰,我省略了不相关的代码,并将作业包含在用户模型文件中。
错误
: Route.post()需
要回
调
函数
,但对象未定义,如下所示: app.post('/postjob',jobs.createJob);触发
错误
。, unique: true }, color
浏览 5
提问于2015-09-05
得票数 1
回答已采纳
3
回答
错误
: Route.put()需
要回
调
函数
,
但
获得了
[
object
Undefined]
javascript
、
angularjs
、
node.js
、
express
、
mean-stack
我的终端控制台为我提供了以下内容:这是我的应用articles.hasAuthorization, articles.delete); 我收到以下
错误
articles.hasAuthorization, articles.update) // .d
浏览 0
提问于2015-11-18
得票数 1
1
回答
执行多个导出时,“
错误
:
Route.get
()需
要回
调
函数
,
但
得到[
object
Undefined]”
javascript
、
node.js
、
express
、
export
、
middleware
我正在尝试导出中间件
函数
,以便其他类可以调用它。profile(app);\node_modules\express\lib\router\route.js:202 ^ 我
浏览 55
提问于2019-11-17
得票数 0
回答已采纳
2
回答
错误
: Route.post()需
要回
调
函数
,
但
获得了
[
object
Undefined]
node.js
然而,当我启动服务时,它抛出了
Route.get
(),需要一个回
调
函数
,
但
得到了一个对象未定义的
错误
。我不能找出
错误
在哪里。型号: agreement_master.js。cookie-parser'); 以下行中的此部分出现
错误
浏览 0
提问于2019-02-01
得票数 1
0
回答
节点
错误
:
Route.get
()需
要回
调
函数
,
但
获得了
[对象未定义]
node.js
、
express
、
callback
、
node-async
、
node-request
我简化了代码,只显示了异步系列中的一个
函数
。if(err) return next(err) } }
错误
消息
Route.get
() requires callback functions but got a [
object
Undefined]
浏览 8
提问于2016-07-07
得票数 1
回答已采纳
1
回答
Express js
Route.get
()需
要回
调
函数
,
但
获得了
[对象未定义]
express
、
routes
我相信我已经完全遵循了教程,但是我得到了这个
错误
: [nodemon] starting `node .express-locallibrary-tutorial/node_modules/express/lib/router/route.js:202 ^ at Rou
浏览 24
提问于2019-01-01
得票数 0
1
回答
节点
Route.get
()需
要回
调
函数
,
但
获得了
[未定义的对象]
node.js
、
coffeescript
我正在尝试在Coffeescript中为它编写路由文件,除非出于某种原因,我一直收到这个
错误
: throw new Error(msg); Error:
Route.get
() requires callback_compile (module.js:456:26) at
Object
.Module._compile
浏览 0
提问于2014-10-21
得票数 3
回答已采纳
1
回答
Node.js
错误
:
Route.get
()需
要回
调
函数
,
但
获得了
[未定义的对象]
javascript
、
node.js
、
express
你好,我知道这个问题在stackoverflow中很常见,但是我忽略了所有的问题,我真的不知道我的代码出了什么问题。var app = express();var bodyParser = require('body-parser'); app.use(express.static(path.join(
浏览 0
提问于2016-06-08
得票数 0
1
回答
路由器get内部的Post需
要回
调
函数
,
但
获得了
[
object
Object
]
node.js
、
express
、
router
我知道我正在连接到'routes/dropbox‘,当我调用路由器内部的post时,我得到了
错误
"Route.post()需要一个回
调
函数
,
但
得到了一个对象对象“ App.js var createError当我调用该post时发生
错误
。我写错了吗?
浏览 14
提问于2020-04-24
得票数 0
回答已采纳
10
回答
错误
:.post()需
要回
调
函数
,
但
[
object
Undefined]无法工作
javascript
、
node.js
、
post
、
routes
有几个主题相同的问题,但我无法解决我的问题。 Index.js rutas.js user.js controller.js 我使用版本"express","^ 4.13.3“ 你能帮我吗?谢谢。我将上传的任何其他细节都被省略了。我将上传的任何其他细节都被省略了。
浏览 178
提问于2016-01-18
得票数 23
回答已采纳
1
回答
Express.js MVC结构:"
Route.get
()需
要回
调
“
错误
node.js
、
express
我希望能够从路由器和控制器文件中访问我的ensureAuthenticated
函数
(它位于app.js中)。feed.js -> Feed路由器,这里什么都不会发生。router.get('/feedtest', auth, feedController.index);如果我将ensureAuthenticated
函数
从feedController.js
浏览 6
提问于2015-11-08
得票数 2
回答已采纳
2
回答
如何在路由器文件中获取应用程序( Node/Express应用程序)
javascript
、
node.js
、
express
router.get('/myroute', function (req, res, next) { });
错误
:
Route.get</em
浏览 4
提问于2015-07-09
得票数 15
回答已采纳
点击加载更多
扫码
添加站长 进交流群
领取专属
10元无门槛券
手把手带您无忧上云
相关
资讯
jQuery中$.ajax和$.getJson同步
AJAX开发教程之$.ajax常用方法详解
jQuery中获取服务器数据的方法
你应该了解的25个JS技巧
ES6缩略版
热门
标签
更多标签
云服务器
ICP备案
实时音视频
对象存储
即时通信 IM
活动推荐
运营活动
广告
关闭
领券