Say I have the following structure
packages
- @my-scope/packageA
- @my-scope/packageB
- @my-scope/packageC
Let's say I want to install packageA as a dependency of packageB. With NPM 8 workspaces I would think this ought to do it:
npm install @my-scope/packageA --workspace=@my-scope/packageB
Instead I get this:
npm ERR! 404 Not Found - GET https://registry.npmjs.org/@my-scope%2fpackageA - Not found
npm ERR! 404
npm ERR! 404 '@my-scope/packageA@*' is not in this registry.
npm ERR! 404 You should bug the author to publish it (or use the name yourself!)
npm ERR! 404
npm ERR! 404 Note that you can also install from a
npm ERR! 404 tarball, folder, http url, or git url.
Clearly it is trying to get it from the registry (and no, I haven't published yet, not ready) but I want it to recognize that this dependency is in my project as a workspace. Anyone know why this might be happening? I haven't found many good resources explaining how to install dependencies from inside your monorepo (I don't even know what those are called...).
npm install @my-scope/packageA --workspace=@my-scope/packageB@<LOCAL_VERSION>
– Kolosick