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

Multiple issues when trying to tag many components #8868

Closed
sbland opened this issue May 9, 2024 · 2 comments
Closed

Multiple issues when trying to tag many components #8868

sbland opened this issue May 9, 2024 · 2 comments
Labels

Comments

@sbland
Copy link

sbland commented May 9, 2024

Describe the bug

I'm working on a project I've had going for a while with a lot of components. I hadn't previously been using the bit tag workflow and instead just using git. This was fine for me as I'm trying to transition an old project into using Bit but now I need to use the build pipeline I can't do this without tagging/snapping.

I'm hitting a few issues when trying to start tagging my components. To try and reduce issues I started by tagging the components with little or no dependencies. This seemed to work fine. As an example I have a core/lib package that just contains type definitions in .ts files.

I can then snap components that are dependent on the core/lib package but when I run bit build I start to get a few errors. With bit build I get the following error:

✖ env: cam-org.cam/envs/react-env-custom@706551995ad73fb60691ec028994b62d62f812e5, task "teambit.compilation/compiler:TypescriptCompile" threw an error
Debug Failure.

If I try bit build <component-pattern> where <component-pattern> doesn't includes the core/lib package I get the following error:

✖ env: cam-org.cam/envs/node-env-custom@fa9a7e940e3c1fe749e659cb961b50f0ba37ccd6, task "teambit.compilation/compiler:TypescriptCompile" threw an error
unable to find component for /home/sam/Library/Caches/Bit/capsules/ad22b43bf6387b1471e6f3c9f991fea1c6460ef5/cam-org.cam_connect-and-flow_core_lib@c1502379973ab40e31b38df86a5e5b038e7364ef

If I try bit build <component-pattern> where <component-pattern> includes the core/lib package I get the following error:

Failed task 1: "teambit.compilation/compiler:TypescriptCompile" of env "cam-org.cam/envs/node-env-custom@fa9a7e940e3c1fe749e659cb961b50f0ba37ccd6"
component: cam-org.cam/connect-and-flow/server/routes/_all@e1ca7f915b0fdd203acbe861ea53f3ef640ab8f6
/home/sam/Library/Caches/Bit/capsules/ad22b43bf6387b1471e6f3c9f991fea1c6460ef5/cam-org.cam_connect-and-flow_server_routes_all@e1ca7f915b0fdd203acbe861ea53f3ef640ab8f6/index.ts:20:14 - error TS2742: The inferred type of 'getRoutes' cannot be named without a reference to '../cam-org.cam_connect-and-flow_server_routes_command_nodes@ec9ceabbd21f774fe7bc6ca3adb7323a4ac716d5/node_modules/@cam-org/cam.connect-and-flow.core.lib/flow-workspace.js'. This is likely not portable. A type annotation is necessary.

Expected Behavior

Should build the components.

Specifications

  • Bit version:1.6.145
  • Workspace type: harmony
  • Node version:v18.19.1
  • npm / yarn version:v10.2.1
  • Platform: ubuntu

Envs:

teambit.react/react
teambit.html/html
teambit.harmony/node
teambit.harmony/aspect
teambit.react/react-native
teambit.envs/env
teambit.mdx/mdx
teambit.mdx/readme
cam-org.cam/envs/react-env-custom@706551995ad73fb60691ec028994b62d62f812e5
cam-org.cam/envs/node-env-custom@fa9a7e940e3c1fe749e659cb961b50f0ba37ccd6
@sbland sbland added the type/bug label May 9, 2024
@GiladShoham
Copy link
Member

Can you please run just bit build --log (no pattern) and attach here the log?

@sbland
Copy link
Author

sbland commented May 13, 2024

I'm closing as this the main error was a component that was not assigned the correct environment. When I then did a bit reset --all and started re tagging it seems to be working fine.

@sbland sbland closed this as completed May 13, 2024
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

2 participants