Crawling-Infrastructure icon indicating copy to clipboard operation
Crawling-Infrastructure copied to clipboard

Cannot read property 'Schema' of undefined

Open Aditya94A opened this issue 4 years ago • 0 comments

Any ideas?

Something about the mongoose types dependencies is conflicting with something else..


C:\Projects\Crawling-Infrastructure\master\src\models\crawltask.model.js:24
var CrawlTaskSchema = new mongoose_1["default"].Schema({
                                                ^
TypeError: Cannot read property 'Schema' of undefined
    at Object.<anonymous> (C:\Projects\Crawling-Infrastructure\master\src\models\crawltask.model.js:24
:49)
    at Module._compile (internal/modules/cjs/loader.js:1147:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1167:10)
    at Module.load (internal/modules/cjs/loader.js:996:32)
    at Function.Module._load (internal/modules/cjs/loader.js:896:14)
    at Module.require (internal/modules/cjs/loader.js:1036:19)
    at require (internal/modules/cjs/helpers.js:72:18)
    at Object.<anonymous> (C:\Projects\Crawling-Infrastructure\master\src\services\crawltask.service.t
s:3:1)
    at Module._compile (internal/modules/cjs/loader.js:1147:30)
    at Module.m._compile (C:\Projects\Crawling-Infrastructure\master\node_modules\ts-node\src\index.ts
:858:23)
    at Module._extensions..js (internal/modules/cjs/loader.js:1167:10)
    at Object.require.extensions.<computed> [as .ts] (C:\Projects\Crawling-Infrastructure\master\node_
modules\ts-node\src\index.ts:861:12)
    at Module.load (internal/modules/cjs/loader.js:996:32)
                                                                                            

Aditya94A avatar Nov 17 '20 07:11 Aditya94A