这确实令人沮丧。
Package.json是我组织中托管在github上的一个回购协议。我试图通过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安装正常(!!!)
运行jspm install:
jspm install github:tomorrowfinance/tf-modernizr@master
或
jspm 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此处的文档很复杂。我想念什么?
最佳答案
由于这是一个私有存储库,因此您需要允许jspm访问它。
只需使用以下命令配置对github的访问:
关于javascript - JSPM无法安装(来自github的404)但可以从npm安装,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/37848205/