0

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.

0

1 Answer 1

2

if you don't want to use the latest version of typeorm, you should downgrade @nestjs/typeorm to 8.0.4, as discussed here: https://github.com/nestjs/typeorm/issues/1289 because @nestjs/typeorm 8.1 is only compatible with [email protected]

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.