0
我在Node v6.10.3和NPM v3.8.6上。NPM未能安裝任何有限範圍的軟件包
我的問題是我無法安裝任何作用域軟件包。一切都返回404未找到。
下面是一些例子名單:
2 info using [email protected]
3 info using [email protected]
4 silly loadCurrentTree Starting
5 silly install loadCurrentTree
6 silly install readLocalPackageData
7 silly fetchPackageMetaData @angular/[email protected]^4.1.2
8 silly fetchNamedPackageData @angular/common
9 silly mapToRegistry name @angular/common
10 silly mapToRegistry scope (from package name) @angular
11 verbose mapToRegistry no registry URL found in name for scope @angular
12 silly mapToRegistry using default registry
13 silly mapToRegistry registry http://registry.npmjs.org/
14 silly mapToRegistry data Result {
14 silly mapToRegistry raw: '@angular/common',
14 silly mapToRegistry scope: '@angular',
14 silly mapToRegistry name: '@angular/common',
14 silly mapToRegistry rawSpec: '',
14 silly mapToRegistry spec: 'latest',
14 silly mapToRegistry type: 'tag' }
15 silly mapToRegistry uri http://registry.npmjs.org/@angular%2fcommon
16 verbose request uri http://registry.npmjs.org/@angular%2fcommon
17 verbose request no auth needed
18 info attempt registry request try #1 at 4:58:49 PM
19 verbose request id cd941220750809c1
20 http request GET http://registry.npmjs.org/@angular%2fcommon
21 http 404 http://registry.npmjs.org/@angular%2fcommon
22 verbose headers { date: 'Thu, 22 Jun 2017 20:58:49 GMT',
22 verbose headers 'content-type': 'application/json',
22 verbose headers 'content-length': '21',
22 verbose headers connection: 'keep-alive',
22 verbose headers 'cache-control': 'max-age=0',
22 verbose headers 'accept-ranges': 'bytes',
22 verbose headers via: '1.1 varnish',
22 verbose headers age: '0',
22 verbose headers 'x-served-by': 'cache-ord1732-ORD',
22 verbose headers 'x-cache': 'MISS',
22 verbose headers 'x-cache-hits': '0',
22 verbose headers 'x-timer': 'S1498165129.495392,VS0,VE389' }
23 silly get cb [ 404,
23 silly get { date: 'Thu, 22 Jun 2017 20:58:49 GMT',
23 silly get 'content-type': 'application/json',
23 silly get 'content-length': '21',
23 silly get connection: 'keep-alive',
23 silly get 'cache-control': 'max-age=0',
23 silly get 'accept-ranges': 'bytes',
23 silly get via: '1.1 varnish',
23 silly get age: '0',
23 silly get 'x-served-by': 'cache-ord1732-ORD',
23 silly get 'x-cache': 'MISS',
23 silly get 'x-cache-hits': '0',
23 silly get 'x-timer': 'S1498165129.495392,VS0,VE389' } ]
24 silly fetchPackageMetaData Error: Not found : @angular/common
1 verbose cli 'install',
1 verbose cli '@types/jasmine' ]
2 info using [email protected]
3 info using [email protected]
4 silly loadCurrentTree Starting
5 silly install loadCurrentTree
6 silly install readLocalPackageData
7 silly fetchPackageMetaData @types/[email protected]
8 silly fetchNamedPackageData @types/jasmine
9 silly mapToRegistry name @types/jasmine
10 silly mapToRegistry scope (from package name) @types
11 verbose mapToRegistry no registry URL found in name for scope @types
12 silly mapToRegistry using default registry
13 silly mapToRegistry registry http://registry.npmjs.org/
14 silly mapToRegistry data Result {
14 silly mapToRegistry raw: '@types/jasmine',
14 silly mapToRegistry scope: '@types',
14 silly mapToRegistry name: '@types/jasmine',
14 silly mapToRegistry rawSpec: '',
14 silly mapToRegistry spec: 'latest',
14 silly mapToRegistry type: 'tag' }
15 silly mapToRegistry uri http://registry.npmjs.org/@types%2fjasmine
16 verbose request uri http://registry.npmjs.org/@types%2fjasmine
17 verbose request no auth needed
18 info attempt registry request try #1 at 5:00:56 PM
19 verbose request id 7a34acc3581b3816
20 http request GET http://registry.npmjs.org/@types%2fjasmine
21 http 404 http://registry.npmjs.org/@types%2fjasmine
22 verbose headers { date: 'Thu, 22 Jun 2017 21:00:57 GMT',
22 verbose headers 'content-type': 'application/json',
22 verbose headers 'content-length': '2',
22 verbose headers connection: 'keep-alive',
22 verbose headers 'cache-control': 'max-age=0',
22 verbose headers 'accept-ranges': 'bytes',
22 verbose headers via: '1.1 varnish',
22 verbose headers age: '0',
22 verbose headers 'x-served-by': 'cache-ord1729-ORD',
22 verbose headers 'x-cache': 'MISS',
22 verbose headers 'x-cache-hits': '0',
22 verbose headers 'x-timer': 'S1498165257.978535,VS0,VE139',
22 verbose headers vary: 'Accept-Encoding' }
23 silly get cb [ 404,
23 silly get { date: 'Thu, 22 Jun 2017 21:00:57 GMT',
23 silly get 'content-type': 'application/json',
23 silly get 'content-length': '2',
23 silly get connection: 'keep-alive',
23 silly get 'cache-control': 'max-age=0',
23 silly get 'accept-ranges': 'bytes',
23 silly get via: '1.1 varnish',
23 silly get age: '0',
23 silly get 'x-served-by': 'cache-ord1729-ORD',
23 silly get 'x-cache': 'MISS',
23 silly get 'x-cache-hits': '0',
23 silly get 'x-timer': 'S1498165257.978535,VS0,VE139',
23 silly get vary: 'Accept-Encoding' } ]
24 silly fetchPackageMetaData Error: Registry returned 404 for GET on http://registry.npmjs.org/@types%2fjasmine
到目前爲止,我已經嘗試設置的範圍註冊表(如下圖所示),改變故宮的版本,清除緩存,並刪除節點模塊。
NPM配置集@types:註冊表http://registry.npmjs.org/
到目前爲止沒有奏效。我覺得這可能是npm嘗試訪問作用域包時發生的某種編碼問題。我仍然能夠安裝所有無處不在的軟件包。
另一件事,我注意到這個問題只發生在npmjs註冊表中。我爲@progress設置了另一個範圍註冊表(https://registry.npmjs.telerik.org),而且我實際上可以從那裏安裝軟件包。
任何意見或建議,將不勝感激。