英文:
issue with typeorm modules (Module '"typeorm"' has no exported member 'DataSourceOptions')
问题
I'm getting an error, when launching the project, using docker-compose-up
I have packages in package.json:
"@nestjs/typeorm": "^8.0.2",
"typeorm": "^0.2.22"
I tried to set up "typeorm": "^0.2.45" and got the same error.
英文:
I'm getting an error, when launching the project, using docker-compose-up
I have packages in package.json:
"@nestjs/typeorm": "^8.0.2",
"typeorm": "^0.2.22"
I tried to set up "typeorm": "^0.2.45" and got the same error.
答案1
得分: 1
DataSource
和 DataSourceOptions
是在版本 ^0.3.0
中添加的。更多信息。
您需要将 typeorm 的版本更新到 0.3.x,或者可以使用 Connection
和 ConnectionOptions
来代替。
> Connection 和 ConnectionOptions 已弃用,新的名称要使用 DataSource 和 DataSourceOptions。
英文:
DataSource
and DataSourceOptions
are added in version ^0.3.0
. more.
You need to update the typeorm's version to 0.3.x, or you can use Connection
and ConnectionOptions
instead.
> Connection, ConnectionOptions are deprecated, new names to use are: DataSource and DataSourceOptions
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论