How to sync `yarn.lock` with `package.json`?
<p>I installed a package with <code>yarn add --dev</code>, run its setup process and during it, the package installed several other packages and added those to <code>package.json</code> (in <code>devDependencies</code>), I assume with <strong>npm</strong>. Great, but now my <code>yarn.lock</code> is out of sync.</p>

<p>What is the correct, non-manual way of syncing <code>yarn.lock</code> to the current state of <code>package.json</code>?</p>

<p>Edit: <code>yarn check</code> shows the missing packages as:</p>

<pre><code>error Lockfile does not contain pattern: &lt;package&gt;@&lt;version&gt;
</code></pre>

<p>But it doesn't add them.</p>