teambit / bit

A build system for development of composable software.
https://bit.dev
Other
17.89k stars 929 forks source link

bit build Failing - Cannot write file because it would overwrite input file. #8958

Closed dzfweb closed 4 months ago

dzfweb commented 5 months ago

Description

I just setup a new self-hosted scope and exported the first tag version. Everything worked goods. But now after I'm trying to add a new version, locally it is failing when running any of these commands

bit tag --build bit build

The error

✔ installing dependencies
✔ install packages in 59 capsules. Succeeded in 30s
  Total 59 components to build

  Running build pipeline using 1 environment(s), total 10 tasks 
  building 59 components of env "teambit.react/react". original seeders of this env: 59, graph of this env: 59, graph total (include other envs): 59
✔ (1/10) [Aspect: CoreExporter] Completed successfully in 4ms
✖ env: teambit.react/react, task "teambit.compilation/compiler:TSCompiler" threw an error
error TS5055: Cannot write file '/home/dzfweb/Library/Caches/Bit/capsules/e6173ec7a/campgladiator.cgui-core_private_figma-embed@1.0.1/dist/figma-embed.d.ts' because it would overwrite input file.

Specifications

I've alread recloned the repo, cleaned bit cache, manualyl deleted the capsules, but nothing changed.

GiladShoham commented 5 months ago

Try adding outDir as dist in your tsconfig

dzfweb commented 5 months ago

Try adding outDir as dist in your tsconfig

Same error :/

dzfweb commented 5 months ago

Seems that I'm able to move on after bumping the package version. Weird thing is that this is an untouched package, I needed to force build --unmodified to bump its version and now seems to be working.

UPDATE after the version bump, new build started to fail again, with the same error :/

itaymendel commented 4 months ago

seems like issue was resolved on a slack conversation. issue was file names confusing tsc

dzfweb commented 4 months ago

exactly, the issue was due to a existing index.js file in the component folder. I just renamed that to be index.ts than the tsc handled well.