Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
HamzaMansouri7 opened this issue Nov 20, 2019 · 3 comments
Labels

Comments

@HamzaMansouri7
Copy link

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

@achrinza
Copy link
Member

achrinza commented Nov 20, 2019

You've mentioned that you're using typescript@3.8.1. 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

@raymondfeng
Copy link
Contributor

Close per @achrinza 's comment.

@romechenko
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants