腾讯云
开发者社区
文档
建议反馈
控制台
首页
学习
活动
专区
工具
TVP
最新优惠活动
文章/答案/技术大牛
搜索
搜索
关闭
发布
登录/注册
精选内容/技术社群/优惠产品,
尽在小程序
立即前往
文章
问答
(5579)
视频
沙龙
1
回答
"
mongoose
.Error.
OverwriteModelError
名称“
node.js
、
mongodb
、
express
、
mongoose
实际上,我已经将
模型
名从用户更改为练习,然后得到了以下错误:“抛出新的_
mongoose
.Error.
OverwriteModelError
(名称);
OverwriteModelError
:
无法
覆盖
编译
后
的Exercise
模型
。
浏览 0
提问于2019-12-29
得票数 0
1
回答
Mongoose
:
OverwriteModelError
:
编译
后
无法
覆盖
`
users
`
模型
node.js
、
mongodb
、
mongoose
、
next-auth
模型
没有在其他地方定义,我能想到的唯一问题是表/
模型
已经存在于MongoDB服务器上,但除此之外,我以前从未遇到过这个问题。我当前的代码是: const
mongoose
= require('
mongoose
'); const
users
= require('
浏览 16
提问于2020-12-14
得票数 0
2
回答
Mongoose
OverwriteModelError
:
编译
后
无法
覆盖
模型
node.js
、
mongodb
、
mongoose
我为我的
Mongoose
模型
创建了一个名为data_model/index.js的模块,非常简单。var
mongoose
= require('
mongoose
'),当我运行我
浏览 1
提问于2015-02-24
得票数 1
1
回答
为什么我要一直得到
OverwriteModelError
?
node.js
、
mongodb
、
mongoose
启动服务器时会出现以下错误:const
mongoose
= require("
mongoose
"); const Sche
浏览 2
提问于2020-01-13
得票数 1
3
回答
在mongodb上每个集合使用多个模式
node.js
、
mongodb
、
mongoose
、
schema-design
、
nosql
当我试图运行它时,它给了我这个错误: var
mongoose
= require('
mongoose
'); var Schema =
mon
浏览 8
提问于2013-01-22
得票数 39
回答已采纳
4
回答
如何从猫鼬身上移除
模型
?
javascript
、
node.js
、
mongodb
、
mongoose
、
mongoose-plugins
我的意思是完全删除
模型
,使猫鼬不再意识到它。在声明了一个
模型
之后,我想不出如何让猫鼬忘记这个
模型
,这样就可以重新创建
模型
。
mongoose
.model('Book', bookSchema);当前,上述抛出一个异常。
OverwriteModelError
:
编译
后
不能
覆盖
“Book”
模型
。
浏览 5
提问于2013-10-28
得票数 14
回答已采纳
1
回答
OverwriteModelError
:
编译
后
无法
覆盖
` `Product`‘
模型
javascript
、
node.js
、
mongodb
、
express
、
mongoose
我试图在我的productSchema中调用我的purchaseSchema,但是我得到了一个错误:
OverwriteModelError
:
无法
覆盖
编译
后
的Product
模型
。我能试试什么?这是我的产品模式:var Schema =
mongoose
.Schema; var productSchema = new Schematype: Stri
浏览 1
提问于2017-05-05
得票数 1
回答已采纳
1
回答
Mongoose
NextJS
OverwriteModelError
:
编译
后
无法
覆盖
`Note`
模型
reactjs
、
mongodb
、
mongoose
、
next.js
我正在学习如何在NextJS中使用
Mongoose
,但我总是遇到这个错误。我看过类似的问题,但没有想出如何解决这个问题。重新启动服务器
后
,它再次工作。下面是我的代码: if= require("
mongoose
") let NoteSchema = new
mongoose</em
浏览 21
提问于2021-02-16
得票数 1
回答已采纳
2
回答
编译
后
不能
覆盖
`history`
模型
javascript
、
node.js
、
mongodb
、
mongoose
、
mongoose-schema
我正在尝试保存查询,但它给我错误,一旦
编译
就不能
覆盖
模型
。我的
模型
文件是 const
mongoose
= require("
mongoose
") search_name\lib\index.js:453 ^ <e
浏览 32
提问于2019-01-05
得票数 1
2
回答
Nextjs与MongoDB连接
javascript
、
mongodb
、
next.js
谢谢,import
mongoose
from '
mongoose
'
mongoose
.connect(process.env.MONGODB_URI); //
mongoose
items setup ----
浏览 1
提问于2022-02-04
得票数 0
回答已采纳
1
回答
编译
后
不能
覆盖
` `events`‘
模型
javascript
、
node.js
、
mongodb
我已经将模式定义如下,var
mongoose
= require('
mongoose
'); }, type: String place: { ref: 'Location
浏览 2
提问于2017-02-05
得票数 1
回答已采纳
5
回答
一旦
编译
完节点js,就不能
覆盖
‘node’
模型
javascript
、
node.js
、
mongodb
在
编译
代码时,我会得到这个错误。throw new
mongoose
.Error.
OverwriteModelError
(name);
OverwriteModelError
: Cannot overwrite `
users
这是我的Model/
users
.js文件const bcrypt = require('bcryp
浏览 4
提问于2017-07-17
得票数 6
回答已采纳
1
回答
将POST调用JSON数据与存储在数据库中的
Mongoose
进行比较以进行验证
node.js
、
mongodb
、
mongoose
call JSON数据示例:- name: "Amit",} const userSchema = new
mongoose
.Schema({}, {strict: false}); 我想验证每个REST调用的数据,存储在数据库中的模式不是静态的如果验证成功,数据将使用“用户”
模型
保存。是否有任何方法在不创建<
浏览 1
提问于2019-06-23
得票数 0
1
回答
在mocha测试中侦听手表的“重新加载”事件(例如关闭db连接)。
node.js
、
mongodb
、
mocha.js
我有个错误: 错误:试图打开未关闭的连接。 我发现了几个相关的问题,但它们并不具体适用于--watch场景。
浏览 2
提问于2015-06-10
得票数 2
2
回答
猫鼬-文档集合的
模型
的完整版本和最小版本需要两个模式。
javascript
、
node.js
、
mongodb
、
mongoose
编辑
后
@enRaiser的回答。String, }], }); min:
mongoose
.model('hotel', hotelMinSchema)显然,我不应该有两个
模型
的集合..。
Overwr
浏览 4
提问于2016-07-06
得票数 0
1
回答
带猫鼬的ActionHero js
node.js
、
mongodb
、
mongoose
、
actionhero
我正在使用ActionHero js和
Mongoose
创建一些rest。我把“猫鼬”代码放在一个增强器中,一切都正常。当我修改一些文件时,项目会自动重新
编译
,并返回以下错误:
OverwriteModelError
: var
mongoose
= require('
mongoose
'); exports.mon
浏览 2
提问于2014-06-29
得票数 1
回答已采纳
1
回答
OverwriteModelError
:
编译
后
不能
覆盖
` Cannot‘
模型
node.js
、
express
、
jestjs
var
mongoose
= require('
mongoose
'); }, type:String, } module.exports =
mongoose
.model/startup/routes&quo
浏览 2
提问于2019-04-10
得票数 1
1
回答
OverwriteModelError
:
无法
覆盖
编译
后
的'xxxxx‘
模型
node.js
、
mongodb
、
mongoose
在我的程序中使用“猫鼬
模型
”时,我正在隐藏一个错误。我在代码开始时就这样做了:
mongoose
.connect('xxxxx');{ bonus : [String] var bonusModel =
mongoose
.mo
浏览 2
提问于2014-05-08
得票数 1
回答已采纳
1
回答
Mocha中的猫鼬没有正确地删除数据库和关闭连接
javascript
、
node.js
、
mongodb
、
asynchronous
、
mocha.js
我有两个简单的测试,但其中一个测试通过了,但另一个测试没有通过,因为模式再次被
编译
。 StagingManager = require('..('mongodb://localhost/BTest');
浏览 4
提问于2015-05-19
得票数 1
回答已采纳
1
回答
基于nodejs的mongodb多态
模型
node.js
、
mongodb
、
mongoose
、
polymorphism
假设原则是用户可以定义一个自定义
模型
,然后根据定义的
模型
填充数据库中的数据。 type: "string", }; return
浏览 3
提问于2015-09-13
得票数 0
点击加载更多
扫码
添加站长 进交流群
领取专属
10元无门槛券
手把手带您无忧上云
相关
资讯
以太坊DApp开发入门
写代码注意了,打死都不要用 User 这个单词
如何在 Linux 上让一段时间不活动的用户自动登出
用C+来搭建一条迷你区块链!
90后少年搭建了一条区块链后,开始教别人怎样复制
热门
标签
更多标签
活动推荐
运营活动
广告
关闭
领券