require() 自定义包?

require() a custom package?

我正在尝试在 TeamCity 的项目构建步骤中通过 npm 从自定义注册表安装 npm 包。

我使用以下设置创建构建步骤:

运行输入:命令行

步骤名称:安装

运行: 可带参数执行

命令可执行文件: npm

命令参数:安装

并在 .npmrc 文件中指定了自定义注册表:

registry=http://...

但是,当我开始构建时,出现此错误:

[16:29:20] npm ERR! Linux 3.13.0-36-generic

[16:29:20] npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "install"

[16:29:20] npm ERR! node v6.6.0 [16:29:20] npm ERR! npm v3.10.8

[16:29:20] npm ERR! code E404

[16:29:20] npm ERR! 404 Not found : @mohito/libsvc

[16:29:20] npm ERR! 404

[16:29:20] npm ERR! 404 '@mohito/libsvc' is not in the npm registry. [16:29:20] npm ERR! 404 You should bug the author to publish it (or use the name yourself!)

[16:29:20] npm ERR! 404 It was specified as a dependency of 'm-api-server' [16:29:20] npm ERR! 404

...

Process exited with code 1

为什么 npm 找不到我的 @mohito/libsvc 自定义包?

以某种方式重新安装 TeamCity 使其正常工作