rtfeldman/node-test-runner

Unable to install npm package for 0.18.13-beta4

Closed this issue · 12 comments

97jaz commented

The binaries are (or, rather, were) hosted at bintray, which was shut down, according to this discussion thread. (The install process tries to download https://dl.bintray.com/elmlang/elm-test/0.18.13/linux-x64.tar.gz.)

Oddly, there doesn't appear to be a git tag for 0.18.13 in this repo.

If you can find the commit, git log | grep 18.13 or similar I will try and tag a release for you.

So none of the actual elm-test code is binary so it is old that we fetch from bintray, do you have a error log you could share?

97jaz commented

Sure -- here's an excerpt from the install log that my colleague provided:

#11 15.35 error /usr/local/share/.config/yarn/global/node_modules/elm-test: Command failed.
#11 15.35 Exit code: 1
#11 15.35 Command: node install.js
#11 15.35 Arguments:
#11 15.35 Directory: /usr/local/share/.config/yarn/global/node_modules/elm-test
#11 15.35 Output:
#11 15.35 Downloading binaries from https://dl.bintray.com/elmlang/elm-test/0.18.13/linux-x64.tar.gz
#11 15.35 Error decompressing https://dl.bintray.com/elmlang/elm-test/0.18.13/linux-x64.tar.gz Error: incorrect header 

The "incorrect header" error is the result of trying to gunzip the file at https://dl.bintray.com/elmlang/elm-test/0.18.13/linux-x64.tar.gz -- which, if you visit that URL, you'll see is a 403 (Forbidden) error page.

[Edit]
This was from running yarn global add elm@0.18 elm-test@0.18.13-beta4 elm-format@0.8.1.

97jaz commented

Best I can tell, the version number of the npm package doesn't quite square with the version numbers in this repo. In my local /usr/local/lib/node_modules/elm-test directory, the most recent mtime of a file appears to be 2017-11-03, though there do not appear to be any commits on that date, according to this repo. The version reported in package.json is 0.18.9, which makes sense given the date, though that version wasn't tagged in this repo. (The version was bumped to 0.18.9 with commit 432556e.)

So, maybe this npm package corresponds to the code at that commit. If not, it represents a snapshot somewhere between 432556e and 0e4e9b2.

This is the most recent 0.18.X release of an npm package, though there were several tagged releases in this repo that are more recent.

97jaz commented

Looks like it is, in fact, 432556e.

Related: lydell/elm-old-binaries#1

As far as I can tell, the binary in question is https://github.com/stoeffel/elm-interface-to-json. It might be possible to build it from source.

97jaz commented

@lydell You're right. I was able to get the file from the Wayback Machine, and it does, in fact, contain elm-interface-to-json.

97jaz commented

Oh, I see. The installer.js script is explicitly looking for the binary on bintray:

  // Use major.minor.patch from version string - e.g. "1.2.3" from "1.2.3-alpha"
  var binVersion = packageInfo.version.match(/^(\d+\.\d+\.\d+).*$/)[1];

  // 'arm', 'ia32', or 'x64'.
  var arch = process.arch;

  // 'darwin', 'freebsd', 'linux', 'sunos' or 'win32'
  var operatingSystem = process.platform;

  var filename = operatingSystem + "-" + arch + ".tar.gz";
  var url = "https://dl.bintray.com/elmlang/elm-test/" +
    binVersion +
    "/" +
    filename;

@97jaz Great find! We should be able to upload those binaries to GitHub releases on this repo and cut a new 0.18 release, pointing to GitHub releases instead of bintray.

I’ve downloaded elm-interface-to-json binaries for all platforms from web.archive.org.

I’ve made a branch – 0.18 – which changes to download from https://github.com/rtfeldman/node-test-runner/releases/tag/0.18.13 (yes I went ahead and made a release so we can verify that it works).

The 0.18 branch is based on 0.18-security, which seems to be the branch that 0.18.13-beta4 was released from. Relevant PRs:

The only difference between 0.18.13 and 0.18.13-beta4 seems to be dependency security updates.

The test suite passes locally.

@97jaz Can you try out 0.18.13? You can install it by running npm install rtfeldman/node-test-runner#0.18.13.

When that’s done, @harrysarson needs to (I don’t have access to the npm package):

  • Check out the 0.18 branch locally.
  • Run npm publish --tag latest-0.18.0
  • Run npm dist-tag add elm-test@0.18.13 elm0.18.0

(I might have made mistakes in the npm commands above.)

97jaz commented

@lydell I successfully built our Docker image, installing both elm 0.18 (downloading and copying the binaries) and elm-test 0.18 (via npm). Thanks!

(Oh, after writing this I realized that the tag you mentioned is 0.18.13. I used #0.18, which will refer to the branch rather than the tag. I suppose I should change that, in case the branch is deleted. At any rate, it worked.)

elm-test 0.18.13 is now on npm as well!