报错内容:
npm ERR! code ENOLOCAL
npm ERR! Could not install from “Files\nodejs\node_cache_npx\31400” as it does not contain a package.json file.
npm ERR! A complete log of this run can be found in:
npm ERR! D:\Program Files\nodejs\node_cache_logs\2025-02-15T08_48_27_060Z-debug.log
Install for [ ‘create-vite@latest’ ] failed with code 1
看到第二句说无法从xxx文件中提取json文件,想着是不是node版本问题,切换成20.1.0后成功安装
看网上也有人说路径或者用户名中有空格也会导致这个错误