Hi guys,
I have a strange issue when trying to use jspm install with credentials - I can not install bootstrap from github, but can install other packages.
If I remove the JSPM_GITHUB_AUTH_TOKEN variable, the install goes fine.
What I did is to create a new github user, generate a token and use it with jspm. Here is what fails:
$ JSPM_GITHUB_AUTH_TOKEN=<secret> ./node_modules/.bin/jspm install github:twbs/bootstrap
Package.json file does not exist, create it? [yes]:
Would you like jspm to prefix the jspm package.json properties under jspm? [yes]:
Enter server baseURL (public folder path) [./]:
Enter jspm packages folder [./jspm_packages]:
Enter config file path [./config.js]:
Configuration file config.js doesn't exist, create it? [yes]:
Enter client baseURL (public folder URL) [/]:
Do you wish to use a transpiler? [yes]:
Which ES6 transpiler would you like to use, Babel, TypeScript or Traceur? [babel]:
Looking up github:twbs/bootstrap
Updating registry cache...
Downloading github:twbs/boot...@3.3.6
Looking up npm:jquery
Downloading npm:jqu...@2.2.4
warn Error on download for github:twbs/bootstrap
Error: end of central directory record signature not found
at /tmp/blah/node_modules/jspm/node_modules/jspm-github/node_modules/yauzl/index.js:172:14
at /tmp/blah/node_modules/jspm/node_modules/jspm-github/node_modules/yauzl/index.js:517:5
at /tmp/blah/node_modules/jspm/node_modules/jspm-github/node_modules/yauzl/node_modules/fd-slicer/index.js:32:7
at FSReqWrap.wrapper [as oncomplete] (fs.js:576:17)
err Error downloading github:twbs/bootstrap.
warn Installation changes not saved.
The token is correct - I've tested it with jspm registry config github; additionally this works fine: JSPM_GITHUB_AUTH_TOKEN=<secret> ./node_modules/.bin/jspm install github:github/fetch
Any ideas?
Full reproduction:
ssh to clean ubuntu 14.04 machine:
$ sudo apt-get install -y nodejs
$ mkdir /tmp/blah; cd /tmp/blah
$ npm install jspm
npm WARN deprecated mini...@2.0.10: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
js...@0.16.39 node_modules/jspm
├── grace...@4.1.4
├── sem...@5.2.0
├── n...@2.0.0
├── ch...@1.1.3 (escape-str...@1.0.5, ansi-...@2.2.1, support...@2.0.0, strip...@3.0.1, has-...@2.0.0)
├── jspm-r...@0.4.1 (sem...@4.3.6)
├── mini...@3.0.2 (brace-e...@1.1.5)
├── gl...@6.0.4 (path-is-...@1.0.0, inhe...@2.0.1, on...@1.3.3, infl...@1.0.5)
├── rs...@3.2.1
├── proper-...@1.1.2 (ext...@3.0.0, err-...@1.1.1, re...@0.9.0)
├── mkd...@0.5.1 (mini...@0.0.8)
├── rim...@2.5.2 (gl...@7.0.5)
├── lif...@2.2.4 (rec...@0.6.2, ext...@3.0.0, flagged...@0.3.2, findu...@0.3.0, res...@1.1.7)
├── jspm-...@0.13.14 (ne...@0.1.4, expand...@1.2.2, wh...@1.2.10, ya...@2.6.0, rim...@2.3.4, t...@2.2.1, req...@2.53.0)
├── syst...@0.19.31 (wh...@3.7.7)
├── ugli...@2.6.4 (as...@0.2.10, uglify-to-...@1.0.2, sourc...@0.5.6, ya...@3.10.0)
├── req...@2.72.0 (aws-...@0.6.0, tunnel...@0.4.3, oauth...@0.8.2, foreve...@0.6.1, is-typ...@1.0.0, case...@0.11.0, string...@0.0.5, aw...@1.4.1, isst...@0.1.2, json-stri...@5.0.1, ext...@3.0.0, tough-...@2.2.2, node...@1.4.7, q...@6.1.0, combine...@1.0.5, mime-...@2.1.11, form...@1.0.0-rc4, ha...@3.1.3, b...@1.1.2, http-si...@1.1.1, har-va...@2.0.6)
├── jspm...@0.26.8 (wh...@1.2.10, gl...@5.0.15, t...@1.0.3, rm...@1.1.0, res...@1.1.7, req...@2.58.0)
├── tra...@0.0.105 (comm...@2.9.0, sem...@4.3.6, gl...@5.0.15, source-ma...@0.2.10)
├── cor...@1.2.6
└── systemjs...@0.15.22 (data-uri-...@0.0.4, sourc...@0.5.6, gl...@7.0.5, blue...@3.4.1, rol...@0.30.0, es6-templa...@2.0.0, babel-plugin-transform-...@6.9.0, babel...@6.10.4)
$ ./node_modules/.bin/jspm -v
0.16.39
Running against local jspm install.
$ JSPM_GITHUB_AUTH_TOKEN=<secret> ./node_modules/.bin/jspm install github:twbs/bootstrap
Package.json file does not exist, create it? [yes]:
Would you like jspm to prefix the jspm package.json properties under jspm? [yes]:
Enter server baseURL (public folder path) [./]:
Enter jspm packages folder [./jspm_packages]:
Enter config file path [./config.js]:
Configuration file config.js doesn't exist, create it? [yes]:
Enter client baseURL (public folder URL) [/]:
Do you wish to use a transpiler? [yes]:
Which ES6 transpiler would you like to use, Babel, TypeScript or Traceur? [babel]:
Looking up github:twbs/bootstrap
Updating registry cache...
Downloading github:twbs/boot...@3.3.6
Looking up npm:jquery
Downloading npm:jqu...@2.2.4
warn Error on download for github:twbs/bootstrap
Error: end of central directory record signature not found
at /tmp/blah/node_modules/jspm/node_modules/jspm-github/node_modules/yauzl/index.js:172:14
at /tmp/blah/node_modules/jspm/node_modules/jspm-github/node_modules/yauzl/index.js:517:5
at /tmp/blah/node_modules/jspm/node_modules/jspm-github/node_modules/yauzl/node_modules/fd-slicer/index.js:32:7
at FSReqWrap.wrapper [as oncomplete] (fs.js:576:17)
err Error downloading github:twbs/bootstrap.
warn Installation changes not saved.