Recently, I've been exploring the world of Nestjs and TypeOrm packages, but I've stumbled upon a series of TS errors that have left me perplexed.
While I've managed to resolve many of them, there's one persistent error that continues to baffle me:
src/workout/workout.module.ts:2:10 - error TS2305: Module '"@nestjs/typeorm"' has no exported member 'getRepositoryToken'.
2 import { getRepositoryToken, TypeOrmModule } from '@nestjs/typeorm'
~~~~~~~~~~~~~~~~~~
src/workout/workout.module.ts:2:30 - error TS2305: Module '"@nestjs/typeorm"' has no exported member 'TypeOrmModule'.
2 import { getRepositoryToken, TypeOrmModule } from '@nestjs/typeorm'
The issue stems from the following source code:
import { Module } from '@nestjs/common'
import { getRepositoryToken, TypeOrmModule } from '@nestjs/typeorm'
import { WorkoutResolver } from './workout.resolver'
... (truncated for brevity)
My current typeorm and nestjs/typeorm versions are:
"typeorm": "^0.3.12",
"@nestjs/typeorm": "nestjs/typeorm",
Here is a list of all the dependencies in use:
"dependencies": {
"@apollo/gateway": "^0.51.0",
"@nestjs/apollo": "^10.0.19",
... (list truncated for clarity)
},