Thanks to visit codestin.com
Credit goes to github.com

Skip to content

fix(deps): add missing ci-info dependency#4263

Open
mhassan1 wants to merge 1 commit intolerna:mainfrom
mhassan1:ci-info-dep
Open

fix(deps): add missing ci-info dependency#4263
mhassan1 wants to merge 1 commit intolerna:mainfrom
mhassan1:ci-info-dep

Conversation

@mhassan1
Copy link
Contributor

Description

In d51e344, we added code that uses the ci-info package, but we did not add a dependency on ci-info to package.json; as a result, strict environments (e.g. Yarn Plug'n'Play) show an error like this:

Error: lerna tried to access ci-info, but it isn't declared in its dependencies; this makes the require call ambiguous and unsound.

Motivation and Context

See above.

How Has This Been Tested?

N/A

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Chore (change that has absolutely no effect on users)

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

"aproba": "2.0.0",
"byte-size": "8.1.1",
"chalk": "4.1.0",
"ci-info": "4.3.1",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's not used in @lerna/create right?

Copy link
Contributor Author

@mhassan1 mhassan1 Mar 2, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it is; i see it in @lerna/create/dist/index.js, line 3968 (in v9.0.5)

@oscarmarina
Copy link

Hi,

I've been testing the new npm install-strategy = "linked" and Lerna fails consistently because it attempts to require('ci-info') in libs/core/src/lib/oidc.ts. Since it's not explicitly declared in Lerna's dependencies, the "linked" strategy (which is very strict with phantom dependencies) blocks access to it.

Example/Reproduction Branch:

Note: In this branch, I've had to manually add ci-info to my root package.json as a workaround to keep the CI running. If I remove that line, Lerna immediately fails with the following trace:

Error: Cannot find module 'ci-info'
Require stack:

 .../node_modules/lerna/dist/index.js
 .../node_modules/lerna/dist/cli.js
    at libs/core/src/lib/oidc.ts (.../node_modules/lerna/dist/index.js:5703:30)

Thanks for the fix!

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants