簡體   English   中英

為什么Angular2不屬於我復制的npm存儲庫的一部分?

[英]Why isn't Angular2 part of my replicated npm repository?

我成功地啟動並運行了一個私人npm服務器,該服務器位於Windows 10計算機上的Ubuntu VM內。

我使用https://skimdb.npmjs.com/registry作為CouchDB的源復制了npm存儲庫,並且可以從Windows 10計算機上查詢諸如jquery包。

PS D:\Sources\NodeJS\test> npm view jquery

{ name: 'jquery',
  description: 'JavaScript library for DOM operations',
  'dist-tags': { beta: '3.0.0-rc1', latest: '2.2.4' },
  ...
  gitHead: 'c0185ab7c75aab88762c5aae780b9d83b80eda72',
  dist:
   { shasum: '2c89d6889b5eac522a7eea32c14521559c6cbf02',
     tarball: 'http://registry.npmjs.org/jquery/-/jquery-2.2.4.tgz' },
  directories: {} }

但是,所有@angular/*軟件包似乎都丟失了。 如果我直接將npm指向skimdbskimdb得到完全相同的結果,因此復制不會有問題。

PS D:\Sources\NodeJS\test> npm view @angular/common
npm ERR! Windows_NT 10.0.10586
npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "view" "@angular/common"
npm ERR! node v5.9.1
npm ERR! npm  v3.7.3
npm ERR! code E404

npm ERR! 404 Not Found: @angular/common
npm ERR! 404
npm ERR! 404  '@angular/common' 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! Please include the following file with any support request:
npm ERR!     D:\Sources\NodeJS\test\npm-debug.log

這是適當的注冊表開始嗎?

好的,這似乎可以歸結為范圍限定的軟件包 ,其中@angular是某種命名空間。

我通過指向@angular范圍的軟件包的官方存儲庫解決了這個問題,即我的.npmrc現在看起來如下:

registry=http://<couchdb server ip>:5984/registry/_design/app/_rewrite
@angular:registry=https://registry.npmjs.org/

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM