node.js& mongodb:nocaughtexception:一旦编译
我有此导入
const User = require("./Usermodel")'
,我想将其更改为
const User = require("./UserModel")
尝试更改导入键的何时,以与我的其他导入和实际导入的实际模块名称保持一致。我不断遇到错误:
uncaughtException: Cannot overwrite `User` model once compiled.
我该怎么做才能改变这一点?
I have this import
const User = require("./Usermodel")'
and I want to change it to
const User = require("./UserModel")
When I try to change the import-spelling, to be consistant with my other imports and the actual module-name I'm importing. I keep getting the error:
uncaughtException: Cannot overwrite `User` model once compiled.
What can I do to change this?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
问题是我在不同的文件中有相同的导入。每个人的拼写必须相同。
The problem was that I had the same import in different files. The spelling must be the same in each of them.