1.在运行nodejs-mongodb项目时,项目报错

TypeError: Router.use() requires a middleware function but got a Object

2.解决办法

我发现在写路由的同时忘记了导出

即可解决

TypeError: Router.use() requires a middleware function but got a Object报错解决相关推荐

  1. Router.use() requires a middleware function but got a Object

    Router.use() requires a middleware function but got a Object 代码写快了 忘记加了 哈哈哈哈 module.exports = router

  2. # [解构如何运用的解构--报错 throw new TypeError(‘Router.use() requires a middleware function but got a ‘ + gett

    let aa={ error_code: 0, reason: "插入数据成功" };//如何拿到 error_code 和 reason 的值let { error_code, ...

  3. VueJS项目报错解决:router.map is not a function - 方法大全

    VueJS项目报错解决:router.map is not a function - 方法大全 问题描述: vue报错 router.map is not a function 原因和解决办法(2种以 ...

  4. TypeError: descriptor ‘WhichOneof‘ requires a ‘google.protobuf.pyext._message.CMessage‘ object but r

    TypeError: descriptor 'WhichOneof' requires a 'google.protobuf.pyext._message.CMessage' object but r ...

  5. vue3.0“ Uncaught TypeError: Cannot read property ‘use‘ of undefined”报错解决......

    vue配置路由时,在路由文件中使用Vue.use(router)的语句无法正常启动服务,并且浏览器报错,提示'use'并未定义:vue中没有use()这个方法 加载vue-router是vue2使用的 ...

  6. 报错解决:TypeError: Object type class 'str' cannot be passed to C code

    此文首发于我的个人博客:报错解决 TypeError Object type class 'str' cannot be passed to C code - zhang0peter的个人博客 下午在 ...

  7. “TypeError: list indices must be integers or slices, not str”有关报错解决方案

    "TypeError: list indices must be integers or slices, not str"有关报错解决方案 参考文章: (1)"TypeE ...

  8. TypeError: ‘builtin_function_or_method‘ object is not subscriptable 报错解决方法

    TypeError: 'builtin_function_or_method' object is not subscriptable 报错解决方法 参考文章: (1)TypeError: 'buil ...

  9. 在router中使用pinia报错解决

    在router中使用pinia(getActivePinia was called with no active Pinia. Did you forget to install pinia)报错解决 ...

最新文章

  1. java数组缓冲,java – 字节数组缓冲图像转换速度慢
  2. 20180716:开博宣言
  3. 判断JavaScript对象为null或者属性为空
  4. php答题评分,Thinkphp 答题 评语
  5. [New Portal]Windows Azure Cloud Service (33) 使用Visual Studio 2012 部署Cloud Service
  6. 高效的企业测试-单元和用例测试(2/6)
  7. scrum流程 规划 冲刺_Scrum –困难的部分2:更快地冲刺
  8. TCP的流模式与UDP的报文模式对比
  9. UVA 10129 Play on Words
  10. 955. 删列造序 II
  11. Python官方文档学习心得(第五篇)
  12. 潜流式人工湿地计算_「环保技术」农村混合污水人工湿地处理
  13. 谁能告诉我war包的作用及使用方法。。。。。。
  14. 高通QFIL刷机指南
  15. movielens1M数据处理
  16. 互联网架构模板,“平台技术”
  17. 三个方法教会大家怎样在图片上添加水印,轻松实现水印添加!
  18. win7系统盘瘦身秘诀
  19. 金明的预算budget题解
  20. 区块链概念正宗龙头股

热门文章

  1. Hbase写数据,存数据,读数据的详细过程
  2. 工业界推荐系统实用分析技巧
  3. BTrace简介及使用
  4. elasticsearch 的滚动(scroll)
  5. Presenting the Permanent Generation
  6. JVM调优系列:(二)JVM运行时数据区域
  7. [日常] DNS的迭代查询过程
  8. COBBLER无人值守安装-----已用真实服务器测试
  9. 推荐5款好用的Linux音乐播放器
  10. python-----运算符及while循环