I am relatively new to Nestjs and I am currently using it in my product, I keep getting the below error:
Error: Nest cannot export a provider/module that is not a part of the currently processed module (TypeOrmCoreModule). Please verify whether the exported Connection is available in this particular context.
Possible Solutions:
- Is Connection part of the relevant providers/imports within TypeOrmCoreModule?
at Module.validateExportedProvider (/node_modules/@nestjs/core/injector/module.js:283:19)
at addExportedUnit (/node_modules/@nestjs/core/injector/module.js:251:67)
at Module.addExportedProvider (/node_modules/@nestjs/core/injector/module.js:262:9)
at NestContainer.addExportedProvider (/node_modules/@nestjs/core/injector/container.js:127:19)
at DependenciesScanner.insertExportedProvider (/node_modules/@nestjs/core/scanner.js:231:24)
at /node_modules/@nestjs/core/scanner.js:134:50
at Array.forEach (<anonymous>)
at DependenciesScanner.reflectExports (/node_modules/@nestjs/core/scanner.js:134:17)
at DependenciesScanner.scanModulesForDependencies (/node_modules/@nestjs/core/scanner.js:87:18)
at processTicksAndRejections (node:internal/process/task_queues:96:5)
at async DependenciesScanner.scan (/node_modules/@nestjs/core/scanner.js:29:9)
at async /node_modules/@nestjs/core/nest-factory.js:95:17
at async Function.asyncRun (/node_modules/@nestjs/core/errors/exceptions-zone.js:22:13)
at async NestFactoryStatic.initialize (/node_modules/@nestjs/core/nest-factory.js:94:13)
at async NestFactoryStatic.create (/node_modules/@nestjs/core/nest-factory.js:37:9)
at async bootstrap (/dist/main.js:11:17)
I have no clue as to where this error is emanating from, it seems like a TypeOrm error however I am not sure.
Please any pointer to the cause or how it can be resolved would be deeply appreciated.
Nest version : "^8.0.0"
Thanks in advance.