title: NPM 7 workspaces - how to install new package in workspace?
body: <p>If I have a <a href="https://docs.npmjs.com/cli/v7/using-npm/workspaces" rel="noreferrer">NPM 7 workspace</a> like this:</p>
  <pre><code>root
     - submodule0
     - submodule1
     - submodule2
  </code></pre>
  <p>and I navigate to the submodule0 directory and run <code>npm i somepackage</code> it seems to &quot;break&quot; the workspace by creating a new package-lock.json in the submodule0 directory and installing all the dependencies there.  In other words, it just does the old behavior that existed before I created the workspace.
  I was hoping for a command similar to <a href="https://github.com/lerna/lerna/tree/main/commands/add" rel="noreferrer">lerna</a> where I can install a new package in submodule0 from the <strong>root</strong>.  Something like:</p>
  <pre><code>npm i somepackage --scope submodule0
  </code></pre>
  <p>So far, the only workaround I can find is to edit the submodule0 package.json and add the <code>somepackage</code> manually.  Then run <code>npm i</code> from the root.  Obviously this is not ideal because I need to look up the @latest version, navigate to the subdirectory, open the package.json, etc. etc. as opposed to just typing one line in the root.</p>