JSPM无法安装(来自github的404)但是可以从npm安装

时间:2016-06-16 00:59:54

标签: javascript github npm jspm

这真是令人沮丧。

Package.json,作为我的组织的一部分,在 github 上托管的repo。我试图通过jspm来解决这个问题。

{
  "name": "tf-modernizr",
  "version": "1.0.0",
  "description": "",
  "main": "modernizr.js",
  "scripts": {
    "test": "echo \"Error: no test specified\" && exit 1"
  },
  "repository": {
    "type": "git",
    "url": "git+https://github.com/tomorrowfinance/tf-modernizr.git"
  },
  "author": "Simon Douglas",
  "license": "MIT",
  "bugs": {
    "url": "https://github.com/tomorrowfinance/tf-modernizr/issues"
  },
  "homepage": "https://github.com/tomorrowfinance/tf-modernizr#readme",
  "directories": {}
}

npm install正常(!!!)

运行jspm install: jspm install github:tomorrowfinance/tf-modernizr@masterjspm install github:tomorrowfinance/tf-modernizr通知我有404。

 Looking up github:tomorrowfinance/tf-modernizr
 Updating registry cache...
 Downloading github:tomorrowfinance/tf-modernizr@master
 warn Error on download for github:tomorrowfinance/tf-modernizr
 Bad response code 404
 err  Error downloading github:tomorrowfinance/tf-modernizr.

此处的文档http://jspm.io/docs/getting-started.html没有帮助。这里的文档https://github.com/jspm/registry/wiki/Configuring-Packages-for-jspm很复杂。我错过了什么?

1 个答案:

答案 0 :(得分:1)

由于这是一个私有存储库,您需要允许jspm访问它。

只需使用以下命令配置对github的访问:jspm registry config github