假设我有以下结构
packages
- @my-scope/packageA
- @my-scope/packageB
- @my-scope/packageC
Run Code Online (Sandbox Code Playgroud)
假设我想安装 packageA 作为 packageB 的依赖项。对于 NPM 8 工作区,我认为应该这样做:
npm install @my-scope/packageA --workspace=@my-scope/packageB
相反,我得到这个:
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 …Run Code Online (Sandbox Code Playgroud)