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

Should lerna bootstrap install deps individually #79

Closed
jamiebuilds opened this issue Mar 4, 2016 · 2 comments · Fixed by #101
Closed

Should lerna bootstrap install deps individually #79

jamiebuilds opened this issue Mar 4, 2016 · 2 comments · Fixed by #101

Comments

@jamiebuilds
Copy link
Contributor

Right now we're just executing npm install in each package directory. However, because of the "linked" dependencies, we have an order of operations issue, either we end up installing over the linked dependencies or we try installing dependencies that do not exist.

A possible solution to this might be manually writing out what we want to install:

{
  "dependencies": {
    "a": "1.0.0",
    "b": "2.0.0"
  }
}
$ npm install a@1.0.0 b@2.0.0

This might fix #59. Also I wonder if this will make npm any faster because we're explicitly asking it for things, probably not, but maybe.

@evocateur
Copy link
Member

The versions (foo@1.0.0) aren't necessary in this form (npm i foo bar baz...), because npm recognizes they are in the package.json and uses the version range specified there. In other words, if "glob": "^6.0.0" is specified in dependencies, npm i glob will always install glob@^6.0.0.

As for speed, the only gains I can think of would be the omission of the dependencies unique to the local packages, and those are probably minimal at best. Regardless, this sounds like a good way to fix #59. I'll take a crack at it later today.

@lock
Copy link

lock bot commented Dec 28, 2018

This thread has been automatically locked because there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked as resolved and limited conversation to collaborators Dec 28, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants