node.js - Error in installation of npm dependecies during firebase cloud functions initiation -


i trying initialize firebase cloud functions , part installation of dependencies fails. show

  • npm err! code z_buf_error
  • npm err! errno -5
  • npm err! unexpected end of file

here package.json

{ "name": "functions", "description": "cloud functions firebase", "dependencies": { "firebase-admin": "~4.2.1", "firebase-functions": "^0.5.7" }, "private": true } 

below full logs created during installation:

0 info worked if ends ok 1 verbose cli [ 'c:\\program files\\nodejs\\node.exe', 1 verbose cli   'c:\\program files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js', 1 verbose cli   'install' ] 2 info using npm@5.3.0 3 info using node@v8.3.0 4 verbose npm-session 9486ab817502fd95 5 silly install runpreinstalltoplevellifecycles 6 silly preinstall functions@ 7 info lifecycle functions@~preinstall: functions@ 8 silly install loadcurrenttree 9 silly install readlocalpackagedata 10 silly install loadidealtree 11 silly install clonecurrenttreetoidealtree 12 silly install loadshrinkwrap 13 silly install loadalldepsintoidealtree 14 http fetch 304 https://registry.npmjs.org/firebase-functions 514ms (from cache) 15 http fetch 304 https://registry.npmjs.org/firebase-admin 532ms (from cache) 16 silly pacote range manifest firebase-functions@^0.5.7 fetched in 524ms 17 http fetch 200 https://registry.npmjs.org/firebase-admin/-/firebase-admin-4.2.1.tgz 41ms (from cache) 18 silly fetchpackagemetadata error firebase-admin@~4.2.1 unexpected end of file 19 http fetch 304 https://registry.npmjs.org/lodash 292ms (from cache) 20 http fetch 304 https://registry.npmjs.org/jsonwebtoken 299ms (from cache) 21 http fetch 304 https://registry.npmjs.org/express 303ms (from cache) 22 silly pacote range manifest lodash@^4.6.1 fetched in 307ms 23 silly pacote range manifest jsonwebtoken@^7.1.9 fetched in 309ms 24 silly pacote range manifest express@^4.0.33 fetched in 318ms 25 http fetch 304 https://registry.npmjs.org/joi 125ms (from cache) 26 silly pacote range manifest joi@^6.10.1 fetched in 143ms 27 http fetch 304 https://registry.npmjs.org/sha1 454ms (from cache) 28 silly pacote range manifest sha1@^1.1.1 fetched in 460ms 29 http fetch 304 https://registry.npmjs.org/xtend 169ms (from cache) 30 silly pacote range manifest xtend@^4.0.1 fetched in 174ms 31 http fetch 304 https://registry.npmjs.org/ms 184ms (from cache) 32 silly pacote range manifest ms@^2.0.0 fetched in 188ms 33 http fetch 304 https://registry.npmjs.org/accepts 73ms (from cache) 34 silly pacote range manifest accepts@~1.3.3 fetched in 77ms 35 http fetch 304 https://registry.npmjs.org/array-flatten 69ms (from cache) 36 silly pacote version manifest array-flatten@1.1.1 fetched in 76ms 37 http fetch 304 https://registry.npmjs.org/lodash.once 250ms (from cache) 38 silly pacote range manifest lodash.once@^4.0.0 fetched in 254ms 39 http fetch 304 https://registry.npmjs.org/content-disposition 85ms (from cache) 40 silly pacote version manifest content-disposition@0.5.2 fetched in 89ms 41 http fetch 304 https://registry.npmjs.org/content-type 83ms (from cache) 42 silly pacote range manifest content-type@~1.0.2 fetched in 87ms 43 http fetch 304 https://registry.npmjs.org/cookie 90ms (from cache) 44 silly pacote version manifest cookie@0.3.1 fetched in 94ms 45 http fetch 304 https://registry.npmjs.org/cookie-signature 104ms (from cache) 46 silly pacote version manifest cookie-signature@1.0.6 fetched in 111ms 47 http fetch 304 https://registry.npmjs.org/debug 97ms (from cache) 48 silly pacote version manifest debug@2.6.8 fetched in 101ms 49 http fetch 304 https://registry.npmjs.org/depd 89ms (from cache) 50 silly pacote range manifest depd@~1.1.1 fetched in 95ms 51 http fetch 304 https://registry.npmjs.org/encodeurl 95ms (from cache) 52 silly pacote range manifest encodeurl@~1.0.1 fetched in 99ms 53 http fetch 304 https://registry.npmjs.org/escape-html 91ms (from cache) 54 silly pacote range manifest escape-html@~1.0.3 fetched in 94ms 55 http fetch 304 https://registry.npmjs.org/etag 82ms (from cache) 56 silly pacote range manifest etag@~1.8.0 fetched in 86ms 57 http fetch 304 https://registry.npmjs.org/finalhandler 88ms (from cache) 58 silly pacote range manifest finalhandler@~1.0.4 fetched in 94ms 59 http fetch 304 https://registry.npmjs.org/fresh 93ms (from cache) 60 silly pacote version manifest fresh@0.5.0 fetched in 98ms 61 http fetch 304 https://registry.npmjs.org/merge-descriptors 92ms (from cache) 62 silly pacote version manifest merge-descriptors@1.0.1 fetched in 97ms 63 http fetch 304 https://registry.npmjs.org/methods 92ms (from cache) 64 silly pacote range manifest methods@~1.1.2 fetched in 96ms 65 http fetch 304 https://registry.npmjs.org/on-finished 90ms (from cache) 66 silly pacote range manifest on-finished@~2.3.0 fetched in 93ms 67 http fetch 304 https://registry.npmjs.org/parseurl 91ms (from cache) 68 silly pacote range manifest parseurl@~1.3.1 fetched in 95ms 69 http fetch 304 https://registry.npmjs.org/path-to-regexp 89ms (from cache) 70 http fetch 304 https://registry.npmjs.org/@types%2fsha1 867ms (from cache) 71 silly pacote range manifest @types/sha1@^1.1.0 fetched in 879ms 72 silly pacote version manifest path-to-regexp@0.1.7 fetched in 104ms 73 http fetch 304 https://registry.npmjs.org/proxy-addr 121ms (from cache) 74 http fetch 304 https://registry.npmjs.org/@types%2flodash 912ms (from cache) 75 silly pacote range manifest proxy-addr@~1.1.5 fetched in 127ms 76 silly pacote range manifest @types/lodash@^4.14.34 fetched in 920ms 77 http fetch 304 https://registry.npmjs.org/qs 102ms (from cache) 78 silly pacote version manifest qs@6.5.0 fetched in 109ms 79 http fetch 304 https://registry.npmjs.org/range-parser 98ms (from cache) 80 silly pacote range manifest range-parser@~1.2.0 fetched in 104ms 81 http fetch 304 https://registry.npmjs.org/send 96ms (from cache) 82 silly pacote version manifest send@0.15.4 fetched in 101ms 83 http fetch 304 https://registry.npmjs.org/setprototypeof 87ms (from cache) 84 http fetch 304 https://registry.npmjs.org/serve-static 88ms (from cache) 85 silly pacote version manifest setprototypeof@1.0.3 fetched in 93ms 86 silly pacote version manifest serve-static@1.12.4 fetched in 95ms 87 http fetch 304 https://registry.npmjs.org/statuses 94ms (from cache) 88 silly pacote range manifest statuses@~1.3.1 fetched in 101ms 89 http fetch 304 https://registry.npmjs.org/type-is 97ms (from cache) 90 http fetch 304 https://registry.npmjs.org/utils-merge 98ms (from cache) 91 silly pacote range manifest type-is@~1.6.15 fetched in 108ms 92 http fetch 304 https://registry.npmjs.org/vary 95ms (from cache) 93 http fetch 304 https://registry.npmjs.org/@types%2fexpress 1036ms (from cache) 94 http fetch 200 https://registry.npmjs.org/@types%2fjsonwebtoken 1038ms 95 silly pacote version manifest utils-merge@1.0.0 fetched in 110ms 96 silly pacote range manifest vary@~1.1.1 fetched in 104ms 97 silly pacote range manifest @types/jsonwebtoken@^7.1.32 fetched in 1046ms 98 silly pacote range manifest @types/express@^4.0.33 fetched in 1052ms 99 silly pacote version manifest ms@2.0.0 fetched in 16ms 100 http fetch 304 https://registry.npmjs.org/hoek 107ms (from cache) 101 http fetch 304 https://registry.npmjs.org/topo 108ms (from cache) 102 silly pacote range manifest hoek@2.x.x fetched in 124ms 103 silly pacote range manifest topo@1.x.x fetched in 113ms 104 http fetch 304 https://registry.npmjs.org/isemail 114ms (from cache) 105 silly pacote range manifest isemail@1.x.x fetched in 129ms 106 http fetch 304 https://registry.npmjs.org/moment 125ms (from cache) 107 http fetch 304 https://registry.npmjs.org/charenc 121ms (from cache) 108 silly pacote range manifest moment@2.x.x fetched in 133ms 109 http fetch 304 https://registry.npmjs.org/jws 843ms (from cache) 110 silly pacote range manifest charenc@>= 0.0.1 fetched in 131ms 111 silly pacote range manifest jws@^3.1.4 fetched in 850ms 112 http fetch 304 https://registry.npmjs.org/mime-types 122ms (from cache) 113 http fetch 304 https://registry.npmjs.org/negotiator 122ms (from cache) 114 http fetch 304 https://registry.npmjs.org/crypt 129ms (from cache) 115 silly pacote version manifest negotiator@0.6.1 fetched in 130ms 116 silly pacote range manifest mime-types@~2.1.11 fetched in 132ms 117 silly pacote range manifest crypt@>= 0.0.1 fetched in 139ms 118 silly pacote range manifest mime-types@~2.1.15 fetched in 7ms 119 http fetch 304 https://registry.npmjs.org/unpipe 130ms (from cache) 120 silly pacote range manifest unpipe@~1.0.0 fetched in 135ms 121 http fetch 304 https://registry.npmjs.org/ee-first 116ms (from cache) 122 silly pacote version manifest ee-first@1.1.1 fetched in 120ms 123 http fetch 304 https://registry.npmjs.org/forwarded 130ms (from cache) 124 silly pacote range manifest forwarded@~0.1.0 fetched in 133ms 125 http fetch 304 https://registry.npmjs.org/ipaddr.js 138ms (from cache) 126 silly pacote version manifest ipaddr.js@1.4.0 fetched in 142ms 127 http fetch 304 https://registry.npmjs.org/destroy 152ms (from cache) 128 silly pacote range manifest destroy@~1.0.4 fetched in 159ms 129 http fetch 304 https://registry.npmjs.org/http-errors 156ms (from cache) 130 http fetch 304 https://registry.npmjs.org/mime 149ms (from cache) 131 silly pacote range manifest http-errors@~1.6.2 fetched in 162ms 132 http fetch 304 https://registry.npmjs.org/media-typer 152ms (from cache) 133 silly pacote version manifest mime@1.3.4 fetched in 156ms 134 silly pacote version manifest depd@1.1.1 fetched in 6ms 135 silly pacote version manifest media-typer@0.3.0 fetched in 160ms 136 silly pacote range manifest statuses@>= 1.3.1 < 2 fetched in 3ms 137 http fetch 304 https://registry.npmjs.org/safe-buffer 157ms (from cache) 138 silly pacote range manifest safe-buffer@^5.0.1 fetched in 168ms 139 http fetch 304 https://registry.npmjs.org/inherits 141ms (from cache) 140 http fetch 304 https://registry.npmjs.org/mime-db 154ms (from cache) 141 silly pacote version manifest inherits@2.0.3 fetched in 145ms 142 silly pacote range manifest mime-db@~1.29.0 fetched in 159ms 143 http fetch 304 https://registry.npmjs.org/jwa 280ms (from cache) 144 silly pacote range manifest jwa@^1.1.4 fetched in 284ms 145 http fetch 304 https://registry.npmjs.org/ecdsa-sig-formatter 164ms (from cache) 146 silly pacote version manifest ecdsa-sig-formatter@1.0.9 fetched in 169ms 147 http fetch 304 https://registry.npmjs.org/buffer-equal-constant-time 256ms (from cache) 148 silly pacote version manifest buffer-equal-constant-time@1.0.1 fetched in 261ms 149 http fetch 304 https://registry.npmjs.org/@types%2fnode 839ms (from cache) 150 silly pacote range manifest @types/node@* fetched in 848ms 151 http fetch 304 https://registry.npmjs.org/base64url 884ms (from cache) 152 http fetch 304 https://registry.npmjs.org/base64url 571ms (from cache) 153 http fetch 304 https://registry.npmjs.org/@types%2fserve-static 914ms (from cache) 154 http fetch 304 https://registry.npmjs.org/@types%2fexpress-serve-static-core 901ms (from cache) 155 silly pacote range manifest base64url@^2.0.0 fetched in 894ms 156 silly pacote version manifest base64url@2.0.0 fetched in 580ms 157 silly pacote range manifest @types/serve-static@* fetched in 918ms 158 silly pacote range manifest @types/express-serve-static-core@* fetched in 905ms 159 http fetch 304 https://registry.npmjs.org/@types%2fmime 908ms (from cache) 160 silly pacote range manifest @types/mime@* fetched in 919ms 161 silly pacote range manifest firebase-functions@^0.5.7 fetched in 13ms 162 silly resolvewithnewmodule firebase-functions@0.5.9 checking installable status 163 http fetch 200 https://registry.npmjs.org/firebase-admin/-/firebase-admin-4.2.1.tgz 18ms (from cache) 164 silly fetchpackagemetadata error firebase-admin@~4.2.1 unexpected end of file 165 verbose stack error: unexpected end of file 165 verbose stack     @ gunzip.zlibonerror (zlib.js:152:15) 166 verbose cwd c:\users\eugene.m.aquilino\pal-poc\functions 167 verbose windows_nt 10.0.14393 168 verbose argv "c:\\program files\\nodejs\\node.exe" "c:\\program files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install" 169 verbose node v8.3.0 170 verbose npm  v5.3.0 171 error code z_buf_error 172 error errno -5 173 error unexpected end of file 174 verbose exit [ -5, true ] 

could me find error? thank you!

sometimes (tarball) downloads can become corrupted , when typically sort of zlib-related error. when happens, first step run npm cache clean remove possibly truncated downloads , reattempt npm install ....


Comments

Popular posts from this blog

Is there a better way to structure post methods in Class Based Views -

performance - Why is XCHG reg, reg a 3 micro-op instruction on modern Intel architectures? -

jquery - Responsive Navbar with Sub Navbar -