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

Bootstrap command fails when package -> bundledDependencies is a Boolean #2962

Open
davidmeirlevy opened this issue Aug 5, 2021 · 0 comments
Labels
scope: package management Issues with the bootstrap/add/link commands that relate to package management

Comments

@davidmeirlevy
Copy link
Contributor

davidmeirlevy commented Aug 5, 2021

when a package has a "bundledDependencies": true (valid value by the NPM documentation) the command lerna bootstrap fails.

Expected Behavior

running lerna bootstrap should work as expected and install packages.

Current Behavior

exit 1 with console error: TypeError: collection is not iterable

Possible Solution

check if the value is an array before trying to iterate it:
#2960

Steps to Reproduce (for bugs)

  1. create a monorepo project
  2. run lerna bootstrap - will work as expected.
  3. add "bundledDependencies": true to one of the packages in the monorepo.
  4. run again lerna bootstrap.
  5. error will be shown.

Context

by the NPM documentation, "bundledDependencies" can be either an array or a boolean.
the code at lerna took for granted that if this value exists - it's an array. that is a wrong assumption.

@JamesHenry JamesHenry added the scope: package management Issues with the bootstrap/add/link commands that relate to package management label Jun 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
scope: package management Issues with the bootstrap/add/link commands that relate to package management
Projects
None yet
Development

No branches or pull requests

2 participants