创建vite项目报错:Could not install from "xxxx" as it does not contain a package.json file.
报错原因:路径存在空格
// 运行指令
npm config get cache
返回结果
C:\Users\big Boss\AppData\Roaming\npm-cache
解决方案
1、将big Boss 改为big~1
// 运行指令
npm config set cache "C:\Users\big~1\AppData\Roaming\npm-cache" --global
2、运行命令在文件中调整
// 运行指令
npm config edit