已将NPM软件包发布到Azure Artifacts,但在安装时出现此错误

时间:2020-03-03 06:10:45

标签: npm azure-devops azure-artifacts npm-publish

F:\ angular库\ sampleangular> npm install examplepackage@0.0.1 npm ERR!代码E404 npm ERR! 404未找到-GET https://registry.npmjs.org/examplepackage-未找到 npm ERR! 404 npm ERR! 404'examplepackage@0.0.1'不在npm注册表中。 npm ERR! 404您应该请作者打扰以发布它(或使用您自己的名字!) npm ERR! 404 npm ERR! 404请注意,您也可以从 npm ERR! 404 tarball,文件夹,http url或git url。

npm ERR!可以在以下位置找到此运行的完整日志: npm ERR! C:\ Users \ jack \ AppData \ Roaming \ npm-cache_logs \ 2020-03-03T06_07_13_338Z-debug.log

1 个答案:

答案 0 :(得分:0)

经过一些测试,我们认为您的问题可能与Azure devops feed设置中的UpStream源有关。

enter image description here

以下是我进行测试时的一些信息:

enter image description here

nest是默认npm软件包中的软件包。当我删除npm上游源代码时,运行命令npm install nest时遇到相同的错误。之后,我将NPM公共源(npmjs)添加为Feed设置中的一个上游源,然后当我第二次运行命令时它就起作用了。

因此,您需要添加npmjs作为当前供稿的上游源。希望能有所帮助:)