I am stuck in Mongoose/ Create a Model

I got an error…

Did I do something wrong? I’ve followed the advice of many people but haven’t found anyone with the same error as me. How should I fix the error, please advise me.

var Person = mongoose.model(“Person”, personSchema);

SyntaxError: Identifier ‘Person’ has already been declared
at wrapSafe (internal/modules/cjs/loader.js:915:16)
at Module._compile (internal/modules/cjs/loader.js:963:27)
at Object.Module._extensions…js (internal/modules/cjs/loader.js:1027:10)
at Module.load (internal/modules/cjs/loader.js:863:32)
at Function.Module._load (internal/modules/cjs/loader.js:708:14)
at Module.require (internal/modules/cjs/loader.js:887:19)
at require (internal/modules/cjs/helpers.js:74:18)
at Object. (/home/runner/boilerplate-mongomongoose/server.js:67:14)
at Module._compile (internal/modules/cjs/loader.js:999:30)

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.