Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/elixir/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
私人托管的NPM注册表-@latest不在NPM注册表中_Npm_Couchdb_Npm Registry - Fatal编程技术网

私人托管的NPM注册表-@latest不在NPM注册表中

私人托管的NPM注册表-@latest不在NPM注册表中,npm,couchdb,npm-registry,Npm,Couchdb,Npm Registry,我已经按照(大部分)来自的说明建立了一个私有的npm注册表。我在与注册表交互时使用npm作用域 npm config set @example:registry http://admin:password@localhost:5984/registry/_design/app/_rewrite 我创建了一个名为test的文件夹,并在其中放置了一个文本文档,然后导航到该文件夹并运行 npm init --scope=@example 我没有更改任何默认值,而是创建了package.json文件

我已经按照(大部分)来自的说明建立了一个私有的npm注册表。我在与注册表交互时使用npm作用域

npm config set @example:registry http://admin:password@localhost:5984/registry/_design/app/_rewrite
我创建了一个名为test的文件夹,并在其中放置了一个文本文档,然后导航到该文件夹并运行

npm init --scope=@example
我没有更改任何默认值,而是创建了package.json文件。由于包的作用域是有限的,所以我可以将它发布到我的注册表中

npm publish
我可以看到它以@example/test的形式出现在CouchDB中。当我运行时,我还可以在注册表中看到有关包的详细信息

npm view @example/test
这包括以下几行

dist-tags:
latest: 1.0.0
当我创建另一个文件夹并尝试安装时

npm install @example/test
我得到以下信息

npm ERR! code E404
npm ERR! 404 Object Not Found - GET http://admin:password@localhost:5984/registry/_design/app/@example/test/-/@example/test-1.0.0.tgz
npm ERR! 404
npm ERR! 404  '@example/test@latest' 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.

值得注意的是,在CouchDB gui中,当我导航到registry->@example/test并选择View Attachments时,我可以看到一个@example/test-1.0.0.tgz文件

,你能用
--verbose
标志显示你的
npm配置和命令的输出吗?我们不能在没有测试的情况下进行调试。