“issue with typeorm modules (Module ‘typeorm’ has no exported member ‘DataSourceOptions’)”

huangapple go评论80阅读模式
英文:

issue with typeorm modules (Module '"typeorm"' has no exported member 'DataSourceOptions')

问题

I'm getting an error, when launching the project, using docker-compose-up

“issue with typeorm modules (Module ‘typeorm’ has no exported member ‘DataSourceOptions’)”

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

“issue with typeorm modules (Module ‘typeorm’ has no exported member ‘DataSourceOptions’)”

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

DataSourceDataSourceOptions 是在版本 ^0.3.0 中添加的。更多信息

您需要将 typeorm 的版本更新到 0.3.x,或者可以使用 ConnectionConnectionOptions 来代替。

> 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

huangapple
  • 本文由 发表于 2023年1月5日 19:58:45
  • 转载请务必保留本文链接:https://go.coder-hub.com/75018045.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定