安装vite报错Installfor[‘create-vite@latest‘]failedwithcode1
- 游戏开发
- 2025-09-06 18:54:02
![安装vite报错Installfor[‘create-vite@latest‘]failedwithcode1](/0pic/pp_07.jpg)
报错内容: 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后成功安装 看网上也有人说路径或者用户名中有空格也会导致这个错误
安装vite报错Installfor[‘create-vite@latest‘]failedwithcode1由讯客互联游戏开发栏目发布,感谢您对讯客互联的认可,以及对我们原创作品以及文章的青睐,非常欢迎各位朋友分享到个人网站或者朋友圈,但转载请说明文章出处“安装vite报错Installfor[‘create-vite@latest‘]failedwithcode1”
上一篇
面试题总结