question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Make yarn --no-lockfile optional

See original GitHub issue

We’ve encountered an issue where we have a dependency which makes our tests fail. It’s very annoying and it would be great if --no-lockfile could be optional, preferably set by default and you have the option to respect the lock file in a scenario if you’d like.

We use ember-try to test different builds of our ember-app. We use ember-cli-conditional-compile in order to create different builds for different websites with different features and to test the different builds we use ember-try’s different scenarios. It works great for us in most cases, but it feels like ember-try is only focusing on different scenarios where you test ember betas or other versions of ember data, etc. In those cases --no-lockfile makes a lot of sense. But for us in order to test our different conditionally compiled scenarios we would be prefer if we could test the different compilations with the lockfile so we can make sure the tests are run with the exact same deps and the same deps as the production build will have.

A setting like --respect-lockfile or some similiar naming could work great. I’d be happy to give it a whirl and create a PR if you find this approach reasonable?

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:5 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
rwjbluecommented, May 19, 2018

I think that the nomOptions option should default to —no-lockfile —ignore-engines (when using yarn) and —no-shrinkwrap (when using npm), but if the user provides a custom value (at all) we use it without modification.

Currently, we always add to the options and there is (as pointed out above) no way to opt out

https://github.com/ember-cli/ember-try/blob/4f8b32aa4c54180edee984636caad3a06bf1e898/lib/dependency-manager-adapters/npm.js#L102-L120

0reactions
rwjbluecommented, Nov 2, 2020

This was fixed by https://github.com/ember-cli/ember-try/pull/409 (via buildManagerOptions) and is documented in the README.

Read more comments on GitHub >

github_iconTop Results From Across the Web

yarn install
yarn install is used to install all dependencies for a project. ... If you want to ensure yarn.lock is not updated, use --frozen-lockfile...
Read more >
The Ultimate Guide to yarn.lock Lockfiles - Andrew Hansen
The graceful-fs dependency can safely be considered optional because the package will fallback to Node's built-in library, fs , if graceful-fs ...
Read more >
yarn install no optional - W3schools.blog
pg_restore: error: input file appears to be a text format dump. Please use psql. successeur nombre chaine · No module named 'vectormath' ·...
Read more >
How to install packages based on the lock-file with Yarn?
Yarn 1. I think your best bet is using the --frozen-lockfile flag with yarn install . Docs: If you need reproducible dependencies, ...
Read more >
Yarn: error: no such option: --pure-lockfile - Troubleshooting
I am unable to get yarn set up in any way, and I'm not sure what to do from here. mastodon@blagojevich:~/live$ yarn install...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found