在我的react项目中,在组件中,我希望包括一个npm模块,如下所示:mongoose.connect('mongodb://localhost/test', {useNewUrlParser: true});
这在常规节点js中确实有效,但react显示的是一个TypeError: mongoose.connect is not a function尝试impo
如果我有两种模式,比如:教员%系,我应该如何连接这两种模式,throw new TypeError('Router.use() requires a middleware functionbut got a ' + gettype(fn))我的档案const mongoose = require(&q