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

Ability to opt of of using npm ci #1449

Closed
apaleslimghost opened this issue Jun 4, 2018 · 14 comments
Closed

Ability to opt of of using npm ci #1449

apaleslimghost opened this issue Jun 4, 2018 · 14 comments

Comments

@apaleslimghost
Copy link

Expected Behavior

Being able to tell lerna bootstrap to explicitly use npm install instead of npm ci

Current Behavior

Since 3.0.0-beta.15, lerna bootstrap uses npm ci if it's a version of npm that supports it and you pass the --ci flag. However, on CI environments the --ci flag is always true, and there's no way to turn it off without messing around with environment variables, which would have other side effects.

Context

Since we're not committing package-lock.json files (our current tooling doesn't play nicely with them at present) npm ci errors, and we can't currently use lerna on CI with [email protected].

@evocateur
Copy link
Member

lerna bootstrap --no-ci doesn't work?

@apaleslimghost
Copy link
Author

I tried it and it didn't seem to work 🤷‍♀️ Financial-Times/x-dash@8a18f7e

@evocateur
Copy link
Member

evocateur commented Jun 5, 2018 via email

@apaleslimghost
Copy link
Author

did a bit of digging into yargs' parsing and it looks like .config() takes precedence over command line args

@evocateur
Copy link
Member

evocateur commented Jun 5, 2018 via email

@track0x1
Copy link

What is the verdict on this? Can we lerna bootstrap --no-ci? Or better, can this functionality be changed to be explicit? There was nothing indicating that lerna would use npm ci when my build ran on AWS Codebuild. ☹️

@evocateur
Copy link
Member

I plan on releasing the next version of lerna 3 sometime this week.

@raymondfeng
Copy link

@evocateur We cannot set the ci value in lerna.json even when --ci flag is not present on the CLI. Is it by design?

@evocateur
Copy link
Member

Not intentional, no, but the result of a feature I personally haven't used in over a year. I'm not sure why you wouldn't want a faster install during a CI build.

You should still be able to pass --no-ci to disable it, which is relatively easy to encode into your CI scripts. Switching to relative file: specifiers that serialize the whole tree at the root would be better long-term than relying on lerna bootstrap.

@raymondfeng
Copy link

@evocateur We don't check in package-lock.json files and npm ci fails for our build.

--no-ci works for us. I was trying to do so in lerna.json as we configure other commands there. But the ci property is not honored.

@evocateur
Copy link
Member

Yeah, that's an unfortunate side-effect from how the options are configured. I should probably move this block into the base command constructor, where the options are merged with the config file...

evocateur added a commit that referenced this issue Aug 21, 2018
`--ci`, `--progress`, and `--loglevel` are now fully-configurable from `lerna.json`, instead of silently ignored.

refs #1449
@evocateur
Copy link
Member

@raymondfeng Next release should fix this for you properly.

@raymondfeng
Copy link

@evocateur Great! We appreciate your prompt response.

@lock
Copy link

lock bot commented Dec 27, 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 27, 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

No branches or pull requests

4 participants