在Ionic期间遇到错误,尝试启动新应用程序(Ionic版本4.8.0)时无法正常工作

时间:2019-01-16 14:04:47

标签: angular ionic4

尝试以下内容

ionic start helloWorld blank

从离子性开始后出现上述错误

(node:53519) ExperimentalWarning: The http2 module is an experimental API.
⠹ Downloading and extracting blank starter (100.00%) 
events.js:193
      throw er; // Unhandled 'error' event
      ^

ZlibError: zlib: Cannot read property 'length' of null
    at Unzip.Zlib.(anonymous function) (/Users/ahmadkhan/.nvm/versions/node/v9.0.0/lib/node_modules/ionic/node_modules/minizlib/index.js:126:21)
    at Unzip.write (/Users/XXXX/.nvm/versions/node/v9.0.0/lib/node_modules/ionic/node_modules/minizlib/index.js:247:21)
    at Unzip.flush (/Users/XXXX/.nvm/versions/node/v9.0.0/lib/node_modules/ionic/node_modules/minizlib/index.js:206:10)
    at Unzip.end (/Users/XXXX/.nvm/versions/node/v9.0.0/lib/node_modules/ionic/node_modules/minizlib/index.js:213:10)
    at Unpack.end (/Users/XXXX/.nvm/versions/node/v9.0.0/lib/node_modules/ionic/node_modules/tar/lib/parse.js:416:21)
    at IncomingMessage.onend (_stream_readable.js:598:10)
    at Object.onceWrapper (events.js:322:30)
    at emitNone (events.js:120:20)
    at IncomingMessage.emit (events.js:218:7)
    at endReadableNT (_stream_readable.js:1054:12)

1 个答案:

答案 0 :(得分:1)

我通过一些研究得到了它,问题是Node版本(9.0.0)和最新的ionic(4.8.0),我相信, 升级我的Node(v10.15.0)后,它开始正常运行。 谢谢