错误内容:npm ERR! Unexpected token '.'
npm ERR! A complete log of this run can be found in:某个路径
原因:node版本或者npm版本过高或者过低
我这里用的nvm包管理工具 直接在cmd命令行中nvm install 16.13.1安装16.13.1的版本
最后 nvm use 16.13.1版本即可
完成上述工作后 安装element-plus
npm install element-plus --save
安装完后的版本为:"element-plus": "^2.2.9"
(一开始我是先遇到npm ERR! cb() never called! npm ERR! This is an error with npm itself.这个问题,应该都是版本原因)
仅做学习记录,如有侵权请联系删除。