Ionic 4.6.0 is not working: Zliberror

#1

This is my error

C:\xampp\htdocs>ionic start myApp tabs --type=ionic-angular
√ Preparing directory .\myApp - done!
\ Downloading and extracting tabs starter (100.00%)
events.js:136
throw er; // Unhandled ‘error’ event
^

ZlibError: zlib: Cannot read property ‘length’ of null
at Unzip.Zlib.(anonymous function) (C:\Users\HP\AppData\Roaming\npm\node_modules\ionic\node_modules\minizlib\index.js:126:21)
at Unzip.write (C:\Users\HP\AppData\Roaming\npm\node_modules\ionic\node_modules\minizlib\index.js:247:21)
at Unzip.flush (C:\Users\HP\AppData\Roaming\npm\node_modules\ionic\node_modules\minizlib\index.js:206:10)
at Unzip.end (C:\Users\HP\AppData\Roaming\npm\node_modules\ionic\node_modules\minizlib\index.js:213:10)
at Unpack.end (C:\Users\HP\AppData\Roaming\npm\node_modules\ionic\node_modules\tar\lib\parse.js:416:21)
at IncomingMessage.onend (_stream_readable.js:598:10)
at Object.onceWrapper (events.js:254:19)
at IncomingMessage.emit (events.js:164:20)
at endReadableNT (_stream_readable.js:1054:12)
at _combinedTickCallback (internal/process/next_tick.js:138:11)

#2

Hi,

I am receiving the same error have you found any solution?

#3

Just Uninstall your NodeJs and Install current Nodejs version

#4

Your problem is probably with npm, something to do with permissions and files. This happens quite often and is almost impossible to successfully debug (at least here in the forum).

One solution: Uninstall your node, install nvm (or nvm-windows if you are on Windows), install a new node (which includes npm) with this, then install ionic and cordova again and try your command again. The problem should be gone.