首页 > 解决方案 > Lerna 添加命令退出,出现不相关包的错误

问题描述

我正在使用 lerna 来管理我的多重存储库,其中包含相互关联的包。在安装新的操作系统之前,我没有这个问题。现在,当我尝试使用lerna add将包的依赖项添加到包时,它会产生与所提到的包无关的错误,这些包与我所针对的包和依赖包无关。

这是我的控制台输出:

[filip@filip-thinkpad platform]$ lerna add @devell-platform/webcomponents-base --scope=@devell-platform/web-manual
lerna notice cli v3.18.3
lerna notice filter including "@devell-platform/web-manual"
lerna info filter [ '@devell-platform/web-manual' ]
lerna info Adding @devell-platform/webcomponents-base in 1 package
lerna info Bootstrapping 26 packages
lerna info Installing external dependencies
lerna ERR! npm install exited 1 in '@devell-platform/model'
lerna ERR! npm install stderr:
npm ERR! code E404
npm ERR! 404 Not Found - GET https://registry.npmjs.org/@devell-platform%2fbase-types - Not found
npm ERR! 404 
npm ERR! 404  '@devell-platform/base-types@0.0.0' is not in the npm 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.

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/filip/.npm/_logs/2020-09-27T13_19_58_840Z-debug.log

lerna ERR! npm install exited 1 in '@devell-platform/model'
lerna WARN complete Waiting for 3 child processes to exit. CTRL-C to exit immediately.
lerna ERR! npm install exited 1 in '@devell-platform/model'
lerna ERR! npm install stderr:
npm ERR! code E404
npm ERR! 404 Not Found - GET https://registry.npmjs.org/@devell-platform%2fbase-types - Not found
npm ERR! 404 
npm ERR! 404  '@devell-platform/base-types@0.0.0' is not in the npm 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.

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/filip/.npm/_logs/2020-09-27T13_19_58_840Z-debug.log

lerna ERR! npm install exited 1 in '@devell-platform/model'
lerna WARN complete Waiting for 3 child processes to exit. CTRL-C to exit immediately.

该包 @devell-platform/webcomponents-base不依赖于 any@devell-platform/model@devell-platform/base-types

我尝试了各种方法,例如删除model包,但随后显示其他一些包作为错误的原因。

标签: javascriptnode.jslinuxnpmlerna

解决方案


没有包@devell-platform/webcomponents-base。如果它以前存在,它必须已被删除。

这无关紧要,lerna只是巧合。普通安装npm install @devell-platform/webcomponents-base也失败了。


推荐阅读