Lerna添加命令因不相关软件包的错误而退出

时间:2020-09-27 13:23:25

标签: javascript node.js linux npm lerna

我正在使用lerna通过相互关联的软件包来管理我的multirepo。在安装新的操作系统之前,我没有这个问题。现在,当我尝试使用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@devell-platform/model@devell-platform/base-types都不相关。

我尝试了各种操作,例如删除model程序包,然后删除其他程序包 显示为错误原因。

1 个答案:

答案 0 :(得分:1)

没有软件包@devell-platform/webcomponents-base。如果以前存在,则必须将其删除。

这与lerna无关,只是一个巧合。用npm install @devell-platform/webcomponents-base进行的普通安装也会失败。