【问题标题】:JSPM can't install (404 from github) BUT CAN install from npmJSPM 无法安装(来自 github 的 404)但可以从 npm 安装
【发布时间】:2016-06-16 00:59:53
【问题描述】:

这真是令人沮丧。

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 安装: 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 这里的文档很复杂。我错过了什么?

【问题讨论】:

  • 你试过去回购吗?它不存在:github.com/tomorrowfinance/tf-modernizr
  • 我公开了,JSPM 很高兴。它必须考虑让 JSPM 与私有存储库一起工作。尽管它确实解决了我的问题,但这并不能真正回答问题:/
  • 如果是私人仓库,@Simon,你必须添加 git 凭据

标签: javascript github npm jspm


【解决方案1】:

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

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

【讨论】:

    猜你喜欢
    • 2016-11-05
    • 1970-01-01
    • 2014-01-18
    • 1970-01-01
    • 2016-09-05
    • 2019-04-13
    • 1970-01-01
    • 2019-10-29
    • 2019-01-18
    相关资源
    最近更新 更多