Skip to content
This repository has been archived by the owner. It is now read-only.

ERR! unexpected eof #8747

Closed
emiben opened this issue Jun 29, 2015 · 13 comments

Comments

@emiben
Copy link

commented Jun 29, 2015

183956 info postinstall angular-benchpress@0.2.2
183957 verbose unlock done using C:\Users\Emilino\AppData\Roaming\npm-cache\_locks\angular-benchpress-6bc06a9ae8c26b06.lock for c:\angular.js\node_modules\angular-benchpress
183958 verbose fstream_class Extract
183959 verbose stack Error: unexpected eof
183959 verbose stack     at decorate (c:\Program Files (x86)\nodejs\node_modules\npm\node_modules\fstream\lib\abstract.js:67:36)
183959 verbose stack     at Extract.Abstract.error (c:\Program Files (x86)\nodejs\node_modules\npm\node_modules\fstream\lib\abstract.js:61:12)
183959 verbose stack     at Extract._streamEnd (c:\Program Files (x86)\nodejs\node_modules\npm\node_modules\tar\lib\extract.js:91:35)
183959 verbose stack     at BlockStream.<anonymous> (c:\Program Files (x86)\nodejs\node_modules\npm\node_modules\tar\lib\parse.js:51:8)
183959 verbose stack     at BlockStream.emit (events.js:104:17)
183959 verbose stack     at BlockStream._emitChunk (c:\Program Files (x86)\nodejs\node_modules\npm\node_modules\block-stream\block-stream.js:203:10)
183959 verbose stack     at BlockStream.resume (c:\Program Files (x86)\nodejs\node_modules\npm\node_modules\block-stream\block-stream.js:58:15)
183959 verbose stack     at Extract.Reader.resume (c:\Program Files (x86)\nodejs\node_modules\npm\node_modules\fstream\lib\reader.js:249:34)
183959 verbose stack     at Entry.<anonymous> (c:\Program Files (x86)\nodejs\node_modules\npm\node_modules\tar\lib\parse.js:257:8)
183959 verbose stack     at Entry.emit (events.js:104:17)
183960 verbose fstream_stack Extract._streamEnd (c:\Program Files (x86)\nodejs\node_modules\npm\node_modules\tar\lib\extract.js:91:35)
183960 verbose fstream_stack BlockStream.<anonymous> (c:\Program Files (x86)\nodejs\node_modules\npm\node_modules\tar\lib\parse.js:51:8)
183960 verbose fstream_stack BlockStream.emit (events.js:104:17)
183960 verbose fstream_stack BlockStream._emitChunk (c:\Program Files (x86)\nodejs\node_modules\npm\node_modules\block-stream\block-stream.js:203:10)
183960 verbose fstream_stack BlockStream.resume (c:\Program Files (x86)\nodejs\node_modules\npm\node_modules\block-stream\block-stream.js:58:15)
183960 verbose fstream_stack Extract.Reader.resume (c:\Program Files (x86)\nodejs\node_modules\npm\node_modules\fstream\lib\reader.js:249:34)
183960 verbose fstream_stack Entry.<anonymous> (c:\Program Files (x86)\nodejs\node_modules\npm\node_modules\tar\lib\parse.js:257:8)
183960 verbose fstream_stack Entry.emit (events.js:104:17)
183961 verbose cwd c:\angular.js
183962 error Windows_NT 6.1.7601
183963 error argv "c:\\Program Files (x86)\\nodejs\\node.exe" "c:\\Program Files (x86)\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install"
183964 error node v0.12.4
183965 error npm  v2.10.1
183966 error unexpected eof
183967 error If you need help, you may report this error at:
183967 error     <https://github.com/npm/npm/issues>
183968 verbose exit [ 1, true ]
183969 verbose unbuild node_modules\protractor
183970 info preuninstall protractor@2.1.0
183971 info uninstall protractor@2.1.0
183972 verbose unbuild rmStuff protractor@2.1.0 from c:\angular.js\node_modules
183973 silly gentlyRm c:\angular.js\node_modules\.bin\protractor.cmd is being gently removed
183974 silly gentlyRm verifying c:\angular.js is an npm working directory
183975 silly gentlyRm c:\angular.js\node_modules\.bin\webdriver-manager.cmd is being gently removed
183976 silly gentlyRm verifying c:\angular.js is an npm working directory
183977 silly gentlyRm containing path c:\angular.js is under npm's control, in c:\angular.js
183978 silly gentlyRm deletion target c:\angular.js\node_modules\.bin\protractor.cmd is under c:\angular.js
183979 verbose gentlyRm vacuuming from c:\angular.js\node_modules\.bin\protractor.cmd up to c:\angular.js
183980 silly gentlyRm containing path c:\angular.js is under npm's control, in c:\angular.js
183981 silly gentlyRm deletion target c:\angular.js\node_modules\.bin\webdriver-manager.cmd is under c:\angular.js
183982 verbose gentlyRm vacuuming from c:\angular.js\node_modules\.bin\webdriver-manager.cmd up to c:\angular.js
183983 silly gentlyRm c:\angular.js\node_modules\.bin\protractor is being gently removed
183984 silly gentlyRm verifying c:\angular.js is an npm working directory
183985 silly gentlyRm containing path c:\angular.js is under npm's control, in c:\angular.js
183986 silly gentlyRm deletion target c:\angular.js\node_modules\.bin\protractor is under c:\angular.js
183987 verbose gentlyRm vacuuming from c:\angular.js\node_modules\.bin\protractor up to c:\angular.js
183988 silly gentlyRm c:\angular.js\node_modules\.bin\webdriver-manager is being gently removed
183989 silly gentlyRm verifying c:\angular.js is an npm working directory
183990 silly gentlyRm containing path c:\angular.js is under npm's control, in c:\angular.js
183991 silly gentlyRm deletion target c:\angular.js\node_modules\.bin\webdriver-manager is under c:\angular.js
183992 verbose gentlyRm vacuuming from c:\angular.js\node_modules\.bin\webdriver-manager up to c:\angular.js
183993 info postuninstall protractor@2.1.0
183994 silly gentlyRm c:\angular.js\node_modules\protractor is being purged from base c:\angular.js
183995 verbose gentlyRm don't care about contents; nuking c:\angular.js\node_modules\protractor
183996 silly vacuum-fs purging c:\angular.js\node_modules\protractor
183997 silly vacuum-fs quitting because other entries in c:\angular.js\node_modules
@emiben

This comment has been minimized.

Copy link
Author

commented Jun 29, 2015

image

@valemic

This comment has been minimized.

Copy link

commented Jun 30, 2015

I'm also experiencing the same issue since yesterday. Please what is the solution?

@terry19850829

This comment has been minimized.

Copy link

commented Jul 1, 2015

I got almost the same problem.Who know the true reason?

@itstannus

This comment has been minimized.

Copy link

commented Aug 9, 2015

Same here!!! I am also getting the same problem. Please help

@cgadam

This comment has been minimized.

Copy link

commented Aug 14, 2015

+1 could this be a proxy or network issue?

@tshinnic

This comment has been minimized.

Copy link

commented Oct 30, 2015

I just had this just happen to me, well, hours ago, but it's a new day and after a couple hours more I've located the trashed .tgz file.

In the above the bare mention 183971 info uninstall protractor@2.1.0 might be an indication of which module is having problems. Might.

In my tale of woe I kept seeing mentions of request@2.11.4 and so finally tracked down where that cached module might be. I found on my (Linux Mint) system /home/tom/.npm/request/2.11.4/package.tgz. Sure enough trying to do tar tvzf package.tgz got me an error message out of plain ole` tar.

When I deleted the cached copies of the trashed file (rm -rf 2.11.4) and then repeated the npm install things went much nicer and finally success.

Why can't npm explicitly mention which file - and where - that the I/O error occurred on?

Oh, and to reply to @cgadam 's query, I do indeed believe that I was having network problems. Hence the trashed downloaded .tgz file.

But that should not permanently and mysteriously poison everything from then on. As it is, I would now have to suggest to everyone having inexplicable "npm problems" to delete everything within npm's cache directories. Y'kno, like "have you turned it off and on again?"

.
BTW: the 'other' trash, where there was a /home/tom/.npm/-/ directory, caused much mirth when grep -r "request.*2\.11\.4" * just hung forever, trying to read from stdin. And no, I have no idea which npm version left that 'treat' on my doorstep. Working the first problem I've tried node releases 0.10.x, 0.12.x, and 4.2.1 ! Which all returned the same unhelp on I/O errors.

@tshinnic

This comment has been minimized.

Copy link

commented Oct 30, 2015

Ah, I see someone else elsewhere sorta kinda mentions the wonderful effects of npm cache clean. :/

@shriyanshagnihotri

This comment has been minimized.

Copy link

commented Jun 20, 2016

Same issue!!

@rosca

This comment has been minimized.

Copy link

commented Jul 12, 2016

Same issue!

@a-x-

This comment has been minimized.

Copy link

commented Sep 7, 2016

+1 mac os
npm --version
2.15.9

node --version
v4.5.0

...
326778 verbose unlock done using /Users/invntrm/.npm/_locks/hermione-7727e518ccc15e23.lock for /Users/invntrm/Ya/Projects/fiji/node_modules/hermione
326779 verbose fstream_class Extract
326780 verbose stack Error: unexpected eof
326780 verbose stack     at decorate (/Users/invntrm/.nvm/versions/node/v4.5.0/lib/node_modules/npm/node_modules/fstream/lib/abstract.js:67:36)
326780 verbose stack     at Extract.Abstract.error (/Users/invntrm/.nvm/versions/node/v4.5.0/lib/node_modules/npm/node_modules/fstream/lib/abstract.js:61:12)
326780 verbose stack     at Extract._streamEnd (/Users/invntrm/.nvm/versions/node/v4.5.0/lib/node_modules/npm/node_modules/tar/lib/extract.js:91:35)
326780 verbose stack     at BlockStream.<anonymous> (/Users/invntrm/.nvm/versions/node/v4.5.0/lib/node_modules/npm/node_modules/tar/lib/parse.js:51:8)
326780 verbose stack     at emitNone (events.js:67:13)
326780 verbose stack     at BlockStream.emit (events.js:166:7)
326780 verbose stack     at BlockStream._emitChunk (/Users/invntrm/.nvm/versions/node/v4.5.0/lib/node_modules/npm/node_modules/block-stream/block-stream.js:203:10)
326780 verbose stack     at BlockStream.flush (/Users/invntrm/.nvm/versions/node/v4.5.0/lib/node_modules/npm/node_modules/block-stream/block-stream.js:70:8)
326780 verbose stack     at BlockStream.end (/Users/invntrm/.nvm/versions/node/v4.5.0/lib/node_modules/npm/node_modules/block-stream/block-stream.js:66:8)
326780 verbose stack     at Extract.Parse.end (/Users/invntrm/.nvm/versions/node/v4.5.0/lib/node_modules/npm/node_modules/tar/lib/parse.js:86:23)
326781 verbose fstream_stack Extract._streamEnd (/Users/invntrm/.nvm/versions/node/v4.5.0/lib/node_modules/npm/node_modules/tar/lib/extract.js:91:35)
326781 verbose fstream_stack BlockStream.<anonymous> (/Users/invntrm/.nvm/versions/node/v4.5.0/lib/node_modules/npm/node_modules/tar/lib/parse.js:51:8)
326781 verbose fstream_stack emitNone (events.js:67:13)
326781 verbose fstream_stack BlockStream.emit (events.js:166:7)
326781 verbose fstream_stack BlockStream._emitChunk (/Users/invntrm/.nvm/versions/node/v4.5.0/lib/node_modules/npm/node_modules/block-stream/block-stream.js:203:10)
326781 verbose fstream_stack BlockStream.flush (/Users/invntrm/.nvm/versions/node/v4.5.0/lib/node_modules/npm/node_modules/block-stream/block-stream.js:70:8)
326781 verbose fstream_stack BlockStream.end (/Users/invntrm/.nvm/versions/node/v4.5.0/lib/node_modules/npm/node_modules/block-stream/block-stream.js:66:8)
326781 verbose fstream_stack Extract.Parse.end (/Users/invntrm/.nvm/versions/node/v4.5.0/lib/node_modules/npm/node_modules/tar/lib/parse.js:86:23)
326782 verbose cwd /Users/invntrm/Ya/Projects/fiji
326783 error Darwin 15.6.0
326784 error argv "/Users/invntrm/.nvm/versions/node/v4.5.0/bin/node" "/Users/invntrm/.nvm/versions/node/v4.5.0/bin/npm" "install"
326785 error node v4.5.0
326786 error npm  v2.15.9
326787 error unexpected eof
326788 error If you need help, you may report this error at:
326788 error     <https://github.com/npm/npm/issues>
326789 verbose exit [ 1, true ]
326790 verbose unbuild node_modules/gemini-templar
326791 info preuninstall gemini-templar@2.9.1
326792 info uninstall gemini-templar@2.9.1
326793 verbose unbuild rmStuff gemini-templar@2.9.1 from /Users/invntrm/Ya/Projects/fiji/node_modules
326794 info postuninstall gemini-templar@2.9.1
326795 silly gentlyRm /Users/invntrm/Ya/Projects/fiji/node_modules/gemini-templar is being purged from base /Users/invntrm/Ya/Projects/fiji
326796 verbose gentlyRm don't care about contents; nuking /Users/invntrm/Ya/Projects/fiji/node_modules/gemini-templar
326797 silly vacuum-fs purging /Users/invntrm/Ya/Projects/fiji/node_modules/gemini-templar
326798 silly vacuum-fs quitting because other entries in /Users/invntrm/Ya/Projects/fiji/node_modules
326799 verbose unbuild node_modules/hermione-templar
326800 info preuninstall hermione-templar@3.11.0
326801 info uninstall hermione-templar@3.11.0
326802 verbose unbuild rmStuff hermione-templar@3.11.0 from /Users/invntrm/Ya/Projects/fiji/node_modules
326803 info postuninstall hermione-templar@3.11.0
326804 silly gentlyRm /Users/invntrm/Ya/Projects/fiji/node_modules/hermione-templar is being purged from base /Users/invntrm/Ya/Projects/fiji
326805 verbose gentlyRm don't care about contents; nuking /Users/invntrm/Ya/Projects/fiji/node_modules/hermione-templar
326806 silly vacuum-fs purging /Users/invntrm/Ya/Projects/fiji/node_modules/hermione-templar
326807 silly vacuum-fs quitting because other entries in /Users/invntrm/Ya/Projects/fiji/node_modules
@marinho

This comment has been minimized.

Copy link

commented Feb 8, 2017

Got the same issue.

  • macOS X
  • always with packages d3-geo-projection and leaflet together
  • if I retry, it often works, when not, I retry again and then it works
  • I use my company's own registry, which proxy to npmjs.org
$ npm install
npm ERR! tar.unpack unzip error /var/folders/j5/nm1_yl714pzcbj72v7lnz5g44pph5b/T/npm-55668-23214e7c/my.internal.registry/repository/build.milestones.npm/d3-geo-projection/-/d3-geo-projection-1.0.3.tgz
npm ERR! tar.unpack untar error /var/folders/j5/nm1_yl714pzcbj72v7lnz5g44pph5b/T/npm-55668-23214e7c/my.internal.registry/repository/build.milestones.npm/d3-geo-projection/-/d3-geo-projection-1.0.3.tgz
npm ERR! tar.unpack unzip error /var/folders/j5/nm1_yl714pzcbj72v7lnz5g44pph5b/T/npm-55668-23214e7c/my.internal.registry/repository/build.milestones.npm/leaflet/-/leaflet-1.0.1.tgz
npm ERR! tar.unpack untar error /var/folders/j5/nm1_yl714pzcbj72v7lnz5g44pph5b/T/npm-55668-23214e7c/my.internal.registry/repository/build.milestones.npm/leaflet/-/leaflet-1.0.1.tgz
npm ERR! Darwin 16.4.0
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "install"
npm ERR! node v6.9.1
npm ERR! npm  v3.10.8
npm ERR! code Z_BUF_ERROR
npm ERR! errno -5

npm ERR! unexpected end of file
@phpguru

This comment has been minimized.

Copy link

commented Apr 24, 2017

It's taking around 45 minutes so far to do a fresh npm install on my project.
Dozens, if not hundreds, of packages are telling my client unexpected end of file and retrying several times. It's not clear if I will result in a complete or incomplete set of packages.

Running in silly verbose mode:

...
verb lastModified Tue, 01 Nov 2016 17:37:47 GMT
http request GET http://registry.npmjs.org/isarray
verb request uri http://registry.npmjs.org/string_decoder
verb request no auth needed
info attempt registry request try #1 at 9:42:10 AM
verb etag W/"58e644cb-29d9"
verb lastModified Thu, 06 Apr 2017 13:38:19 GMT
http request GET http://registry.npmjs.org/string_decoder
info retry will retry, error on last attempt: Error: unexpected end of file
info retry will retry, error on last attempt: Error: unexpected end of file
info attempt registry request try #2 at 9:42:20 AM
verb etag W/"58e644cb-29d9"
verb lastModified Thu, 06 Apr 2017 13:38:19 GMT
http request GET http://registry.npmjs.org/string_decoder
info attempt registry request try #2 at 9:42:20 AM
verb etag W/"5818d2eb-226a"
verb lastModified Tue, 01 Nov 2016 17:37:47 GMT
http request GET http://registry.npmjs.org/isarray
info retry will retry, error on last attempt: Error: unexpected end of file
info retry will retry, error on last attempt: Error: unexpected end of file
...
@npm-robot

This comment has been minimized.

Copy link

commented Jun 17, 2017

We're closing this support issue as it has gone three days without activity. The npm CLI team itself does not provide support via this issue tracker, but we are happy when users help each other here. In our experience once a support issue goes dormant it's unlikely to get further activity. If you're still having problems, you may be better served by joining package.community and asking your question there.

For more information about our new issue aging policies and why we've instituted them please see our blog post.

@npm-robot npm-robot closed this Jun 17, 2017

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
You can’t perform that action at this time.