I just received Z_BUF_ERROR while installing NativeScript. I did Google but without any luck.
Environment:
- Windows 10 Enterprise 1703 64-bit
- NodeJS v6.11.2
- npm v5.3.0
Command:
- npm install -g nativescript
Error Log:
- 0 info it worked if it ends with ok
- 1 verbose cli [ 'C:\Program Files\nodejs\node.exe',
- 1 verbose cli 'C:\Users\Hui\AppData\Roaming\npm\node_modules\npm\bin\npm-cli.js',
- 1 verbose cli 'install',
- 1 verbose cli '-g',
- 1 verbose cli 'nativescript' ]
- 2 info using [email protected]
- 3 info using [email protected]
- 4 verbose npm-session 4454628f9775be96
- 5 silly install loadCurrentTree
- 6 silly install readGlobalPackageData
- 7 http fetch GET 200 https://registry.npmjs.org/nativescript 1244ms
- 8 http fetch GET 200 https://registry.npmjs.org/nativescript/-/nativescript-3.1.3.tgz 23ms (from cache)
- 9 silly fetchPackageMetaData error for nativescript@latest unexpected end of file
- 10 verbose stack Error: unexpected end of file
- 10 verbose stack at Zlib._handle.onerror (zlib.js:370:17)
- 11 verbose cwd D:\Dev\Workspace\Local\Angular
- 12 verbose Windows_NT 10.0.15063 13 verbose argv "C:\Program Files\nodejs\node.exe" - "C:\Users\Hui\AppData\Roaming\npm\node_modules\npm\bin\npm-cli.js" "install" "-g" "nativescript"
- 14 verbose node v6.11.2
- 15 verbose npm v5.3.0
- 16 error code Z_BUF_ERROR
- 17 error errno -5
- 18 error unexpected end of file
- 19 verbose exit [ -5, true ]
Any help would be appreciated.
npm cache clean
) and then retry the installation - you can also try to install a lower version of npm. 2.) Disable any antivirus before trying to install NativeScript. 3.) Post your actual error log – Nick Iliev