jspm-cli: unexpected end of file Zlib error

Hello,

First off, thanks for your excellent work with the jspm-cli.

I’m currently using the 0.17.0-beta.31 version to setup an Angular2 app in a Docker VM through VirtualBox for development. After creating a new VM instance running docker and getting setup, everything works great including an npm install but not a jspm install. I spent hours trying to figure out the failed install as I’m seeing:

err  Error on lookup for npm:ng2-cookies
Error: unexpected end of file
    at Zlib._handle.onerror (zlib.js:356:17)

and don’t know how to fix it . This seems to be related to the jspm-cli in a Linux environment since I couldn’t replicate in an OSX Mac environment. Have you seen this before and have a clue as to what may be happening or what setting I may need to turn on ?

I turned off strictSSL to false in my jspm config and that didn’t help. Additional info is I’m using node v7 and npm version 3.10.8.

Here’s the extended trace:

root@d9c83cd24821:/app# jspm i
     Creating registry cache...
     Downloading npm:angular2@2.0.0-beta.12
     Downloading npm:@angular/core@2.0.1
     Downloading npm:@angular/compiler@2.0.1
     Downloading npm:babel-runtime@5.8.34
     Downloading npm:@angular/platform-browser@2.0.1
     Downloading npm:@angular/platform-browser-dynamic@2.0.1
     Downloading github:nickL/ng-forward@master
     Downloading npm:babel-core@5.8.34
     Downloading npm:@angular/http@2.0.1
     Downloading npm:@angular/router@3.0.0
     Downloading npm:@angular/common@2.0.1
ok   Installed peer reflect-metadata to npm:reflect-metadata@0.1.3 (0.1.3)
     Downloading npm:@reactivex/rxjs@5.0.0-alpha.7
     Downloading npm:angular2@2.0.0-beta.1

warn Error on lookup for npm:store, retrying (1).
     Error: read ECONNRESET

err  Error on lookup for npm:ng2-cookies
Error: unexpected end of file
    at Zlib._handle.onerror (zlib.js:356:17)

err  Error looking up npm:ng2-cookies.

warn Installation changes not saved.

Thanks!

About this issue

  • Original URL
  • State: closed
  • Created 8 years ago
  • Reactions: 3
  • Comments: 17 (7 by maintainers)

Most upvoted comments

Alright, well what a coincidence, it appears that others were having similar issues as seen in this virtualbox issue thread. It looks like the VBox team hastened a release because I just noticed that 5.1.10 is available via homebrew. I gave it a go and jspm installs work in the built vagrant box! So, for my issue, and maybe some others from here, ditch VBox 5.1.8 and upgrade to 5.1.10 and hopefully everything returns to normal. This is a huge load off my shoulders.

@guybedford Sorry to eat up this whole thread with a Virtualbox issue. One less thing to worry about though, eh? 😋

I’m also getting this error, and I posted an SO question about it here

I have also seen this many times in out CI system.

@Smolations That was it for me. Thanks for digging into it so diligently!

@Smolations, great sleuthing!

Upgrading VBox to 5.1.10 was the answer. I’m glad their team figured this out and handed us a release of the fix!

@guybedford, +1 to what @Smolations said. Definitely one less thing for you to look at this upcoming year. Thanks for your work on jspm.

OK, getting closer. The only thing different when going back to the old Ubuntu version in my vagrant box was the version of Virtualbox I was using. The original, working version was 5.0.16. In doing newer builds, I had upgraded to the newest version, which was 5.1.8. Downgrading to the older VBox version produced a vagrant box that had successful jspm installs. So it appears that my particular issues have to do with the newer version of Virtualbox. Something with the new VBox version and the way jspm fetches package info (via jspm-npm) is not quite right. Hope this helps anyone else having similar issues. I will continue to look for a solution with the newer version of Virtualbox and post here if I come up with anything.

@guybedford, any update on when you might be able to take a look at this?