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

Best Practice For Importing Another Bit Component to Avoid Ripple CI Failure #8793

Open
gtwilliams03 opened this issue Apr 16, 2024 · 4 comments

Comments

@gtwilliams03
Copy link

Description

Ripple CI fails when I import another of my Bit components when the underlying Bit component's version has been bumped.

Specifications

  • Bit version: 1.6.126
  • Node version: 21.4.0
  • npm / yarn version: yarn 4.1.1
  • Platform: MacOS

Context and additional information

I have a library in Bit in which several components are built on others. Lately I have been experiencing Ripple CI build failures when importing another of my Bit components:

import { timeZone } from '@severed-links/common.js'

const UserMenu = () => React component follows

I get Ripple CI build errors when I tag all of the updated components and bit export them:

No matching version found for @severed-links/[email protected]
This error happened while installing a direct dependency of /tmp/capsules-root/sign-capsules/2024-3-16/1j66qup/[email protected]
BitErrorWithRichMessage: No matching version found for @severed-links/[email protected]

But @severed-links/common.js does exist with that semver number:

image

I feel like I am doing something very dumb and I hesitated even raising the issue to bother you all, but I just can't figure out why I am getting these build errors simply trying to use another of my components.

@GiladShoham
Copy link
Member

can you run bit show <comp-id> and check if you see the common/js in your dependencies?
(you can also paste here the output)

@gtwilliams03
Copy link
Author

This is what I see (and the common.js component is there?

┌───────────────────┬───────────────────────────────────────────────────────────────────────┐
│ id                │ severed-links.common/[email protected]                                 │
├───────────────────┼───────────────────────────────────────────────────────────────────────┤
│ scope             │ severed-links.common                                                  │
├───────────────────┼───────────────────────────────────────────────────────────────────────┤
│ name              │ user-menu                                                             │
├───────────────────┼───────────────────────────────────────────────────────────────────────┤
│ env               │ severed-links.common/envs/[email protected]               │
├───────────────────┼───────────────────────────────────────────────────────────────────────┤
│ package name      │ @severed-links/common.user-menu                                       │
├───────────────────┼───────────────────────────────────────────────────────────────────────┤
│ deprecated        │ false                                                                 │
├───────────────────┼───────────────────────────────────────────────────────────────────────┤
│ main file         │ UserMenu.js                                                           │
├───────────────────┼───────────────────────────────────────────────────────────────────────┤
│ files             │ UserMenu.composition.js                                               │
│                   │ UserMenu.js                                                           │
│                   │ UserMenu.module.scss                                                  │
│                   │ UserMenuComposition.module.scss                                       │
├───────────────────┼───────────────────────────────────────────────────────────────────────┤
│ dev files         │ UserMenu.composition.js (teambit.compositions/compositions)           │
├───────────────────┼───────────────────────────────────────────────────────────────────────┤
│ aspects           │ severed-links.common/envs/[email protected]               │
│                   │ teambit.compilation/compiler                                          │
│                   │ teambit.component/dev-files                                           │
│                   │ teambit.compositions/compositions                                     │
│                   │ teambit.dependencies/dependency-resolver                              │
│                   │ teambit.docs/docs                                                     │
│                   │ teambit.envs/envs                                                     │
│                   │ teambit.harmony/application                                           │
│                   │ teambit.pipelines/builder                                             │
│                   │ teambit.pkg/pkg                                                       │
│                   │ teambit.preview/preview                                               │
│                   │ teambit.semantics/schema                                              │
├───────────────────┼───────────────────────────────────────────────────────────────────────┤
│ dependencies      │ @severed-links/[email protected] (component)           │
│                   │ @severed-links/[email protected] (component)           │
│                   │ @severed-links/[email protected] (component)           │
│                   │ @severed-links/[email protected] (component)           │
│                   │ @severed-links/[email protected] (component)           │
├───────────────────┼───────────────────────────────────────────────────────────────────────┤
│ dev dependencies  │ @severed-links/[email protected] (component) │
├───────────────────┼───────────────────────────────────────────────────────────────────────┤
│ peer dependencies │ lodash@^4.17.21---------- (package)                                   │
│                   │ react@^17.0.0 || ^18.0.0- (package)                                   │
│                   │ [email protected] (package)                                   │
└───────────────────┴───────────────────────────────────────────────────────────────────────┘

@gtwilliams03
Copy link
Author

gtwilliams03 commented May 2, 2024

I am still battling with this. Every time I end up bumping the version of my common.js bit package, the other components that rely on that get out of sync with their dependencies:

No matching version found for @severed-links/[email protected]
This error happened while installing a direct dependency of /tmp/capsules-root/sign-capsules/2024-4-2/1g2ledc/[email protected]
BitErrorWithRichMessage: No matching version found for @severed-links/[email protected]

And I get an error trying to update components in my apps:

% yarn add @severed-links/[email protected]
➤ YN0000: · Yarn 4.1.1
➤ YN0000: ┌ Resolution step
➤ YN0082: │ @severed-links/common.js@npm:0.0.38: No candidates found
➤ YN0000: └ Completed in 0s 331ms
➤ YN0000: · Failed with errors in 0s 346ms

@GiladShoham
Copy link
Member

Are you running install directly with yarn? or bit install with yarn configured?

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

No branches or pull requests

2 participants