You are likely using a version of node-tar or npm that is incompatible with this version of Node.js.
Please use either the version of npm that is bundled with Node.js, or a version of npm (> 5.5.1 or < 5.4.0) or node-tar (> 4.0.1) that is compa
tible with Node.js 9 and above.
--------------------------------------
解决办法:
1.npm uninstall -g npm
2.npm install -g npm
原文:https://www.cnblogs.com/tenghuiling/p/10836424.html