code: function getNpmLifecycleVersion () {
    const npmPath = which.sync('npm', {
      nothrow: true
    })
  
    if (!npmPath) {
      return ''
    }
  
    const pathSuffix = process.platform === 'win32'
      ? '../node_modules/npm/node_modules/npm-lifecycle/package.json'
      : '../../node_modules/npm-lifecycle/package.json'
  
    const lifecyclePkgPath = path.join(fs.realpathSync(npmPath), pathSuffix)
  
    if (!fs.existsSync(lifecyclePkgPath)) {
      return ''
    }
  
    // eslint-disable-next-line global-require
    return require(lifecyclePkgPath).version
  }
docs: 获取 npm-lifecycle 版本
  
  @returns {string} npm-lifecycle version