[nodemon] 2.0.7
[nodemon] to restart at any time, enter rs
[nodemon] watching path(s): .
[nodemon] watching extensions: ts,json
[nodemon] starting ts-node src/index.ts
E:\Angular\nodejs course\node_modules\mongoose\lib\index.js:548
throw new _mongoose.Error.OverwriteModelError(name);
^
OverwriteModelError: Cannot overwrite posts model once compiled.
at Mongoose.model (E:\Angular\nodejs course\node_modules\mongoose\lib\index.js:548:13)
at Object. (E:\Angular\nodejs course\src\models\Post.ts:12:16)
at Module._compile (node:internal/modules/cjs/loader:1108:14)
at Module.m._compile (C:\Users\Dell\AppData\Roaming\npm\node_modules\ts-node\src\index.ts:1056:23)
at Module._extensions..js (node:internal/modules/cjs/loader:1137:10)
at Object.require.extensions. [as .ts] (C:\Users\Dell\AppData\Roaming\npm\node_modules\ts-node\src\index.ts:1059:12)
at Module.load (node:internal/modules/cjs/loader:988:32)
at Function.Module._load (node:internal/modules/cjs/loader:828:14)
at Module.require (node:internal/modules/cjs/loader:1012:19)
at require (node:internal/modules/cjs/helpers:93:18)
at Object. (E:\Angular\nodejs course\src\validators\CommentValidators.ts:2:1)
at Module._compile (node:internal/modules/cjs/loader:1108:14)
at Module.m._compile (C:\Users\Dell\AppData\Roaming\npm\node_modules\ts-node\src\index.ts:1056:23)
at Module._extensions..js (node:internal/modules/cjs/loader:1137:10)
at Object.require.extensions. [as .ts] (C:\Users\Dell\AppData\Roaming\npm\node_modules\ts-node\src\index.ts:1059:12)
at Module.load (node:internal/modules/cjs/loader:988:32)
[nodemon] app crashed - waiting for file changes before starting...
[nodemon] 2.0.7 [nodemon] to restart at any time, enter
rs
[nodemon] watching path(s): . [nodemon] watching extensions: ts,json [nodemon] startingts-node src/index.ts
E:\Angular\nodejs course\node_modules\mongoose\lib\index.js:548 throw new _mongoose.Error.OverwriteModelError(name); ^ OverwriteModelError: Cannot overwrite (E:\Angular\nodejs course\src\models\Post.ts:12:16)
at Module._compile (node:internal/modules/cjs/loader:1108:14)
at Module.m._compile (C:\Users\Dell\AppData\Roaming\npm\node_modules\ts-node\src\index.ts:1056:23)
at Module._extensions..js (node:internal/modules/cjs/loader:1137:10)
at Object.require.extensions. [as .ts] (C:\Users\Dell\AppData\Roaming\npm\node_modules\ts-node\src\index.ts:1059:12)
at Module.load (node:internal/modules/cjs/loader:988:32)
at Function.Module._load (node:internal/modules/cjs/loader:828:14)
at Module.require (node:internal/modules/cjs/loader:1012:19)
at require (node:internal/modules/cjs/helpers:93:18)
at Object. (E:\Angular\nodejs course\src\validators\CommentValidators.ts:2:1)
at Module._compile (node:internal/modules/cjs/loader:1108:14)
at Module.m._compile (C:\Users\Dell\AppData\Roaming\npm\node_modules\ts-node\src\index.ts:1056:23)
at Module._extensions..js (node:internal/modules/cjs/loader:1137:10)
at Object.require.extensions. [as .ts] (C:\Users\Dell\AppData\Roaming\npm\node_modules\ts-node\src\index.ts:1059:12)
at Module.load (node:internal/modules/cjs/loader:988:32)
[nodemon] app crashed - waiting for file changes before starting...
![mongoose overwrite](https://user-images.githubusercontent.com/71388551/116772306-bf249380-aa6b-11eb-800c-638bec2e7e1d.jpg)
posts
model once compiled. at Mongoose.model (E:\Angular\nodejs course\node_modules\mongoose\lib\index.js:548:13) at Object.