报错信息:
The operation was rejected by your operating system.
npm ERR! It is likely you do not have the permissions to access this file as the current user
报错原因: 没有开放权限
解决方案:
终端执行
sudo chown -R $(whoami) $(npm config get prefix)/{lib/node_modules,bin,share}
备注: 清除npm缓存命令
npm install --registry=https://registry.npm.taobao.org --loglevel=silly
npm cache clean --force
npm install