【发布时间】:2023-02-16 20:22:07
【问题描述】:
我的项目面临这个奇怪的问题。这是我遵循的步骤
npm create vite@latest-
cd到项目文件夹。 npm i-
npm run dev这很好用,但是没有生成 vite.config.js 文件。我尝试运行
vite,但随后出现此错误。vite: The term 'vite' is not recognized as a name of a cmdlet, function, script file, or executable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.此外,使用
npm run dev --host也不能使其在 LAN 上可用。适用于实时服务器。我正在使用最新的 npm。
【问题讨论】: