Loopback-next: error TS5056: Cannot write file '/home/node/api/dist/src/datasources/admin.datasource.d.ts' because it would be overwritten by multiple input files

Created on 20 Nov 2019  路  3Comments  路  Source: strongloop/loopback-next


Hi #4170 Loopback DEVS i get this problem after i try to run my server API , im using #angular 7 and #loopback error reference :TS5056
i'm sure that problem in typescript version ..i'm using (3.4.5) right now , i have tried with many version like 3.8.1 ==> error in --target flag
3.5.1===>error in extends must be rooted or relative
1.7.5===> include & exclude Error in Tsconfig
i need help here guys

------this is my Api Tscofig
{ "$schema": "http://json.schemastore.org/tsconfig", "extends": "@loopback/build/config/tsconfig.common.json", "include": [ "src", "test", "index.ts" ], "exclude": [ "node_modules/**", "packages/*/node_modules/**", "**/*.d.ts" ] }
tsconfig
github

bug

Most helpful comment

You've mentioned that you're using [email protected]. I've checked Typescript's published versions and found no reference to the version mentioned. Could you clarify on that?

If you've just updated to typescript@~3.7, then a recent change has led to a file naming conflict, which may be the issue.

If that's the case, it can be resolved by renaming all *.datasource.json files to *.datasource.config.json and then updating all references to those affected files.

The installation of @loopback/cli should be updated to the latest version which has resolved this issue for future generated datasources.

Similar issue: #4119

All 3 comments

You've mentioned that you're using [email protected]. I've checked Typescript's published versions and found no reference to the version mentioned. Could you clarify on that?

If you've just updated to typescript@~3.7, then a recent change has led to a file naming conflict, which may be the issue.

If that's the case, it can be resolved by renaming all *.datasource.json files to *.datasource.config.json and then updating all references to those affected files.

The installation of @loopback/cli should be updated to the latest version which has resolved this issue for future generated datasources.

Similar issue: #4119

Close per @achrinza 's comment.

If that's the case, it can be resolved by renaming all *.datasource.json files to *.datasource.config.json and then updating all references to those affected files.

Thanks, I had the same issue @achrinza 's answer resolved this for me

Was this page helpful?
0 / 5 - 0 ratings