When running and installing the vue3+vite+Ts project, an error occurs and the vite.config.ts file cannot be loaded (failed to load config from D:\XXX\vite.config.ts)

Pull other people's vue3+vite+Ts project on git,
run it after successfully installing the dependencies, and an error message
failed to load config from D:\XXX\vite.config.ts appears
Insert image description here
. The result of Baidu search is to use pnpm to download it.
Insert image description here

Then uninstall the node_modules file and re-download it. At this time, a problem occurs.
Insert image description here

Your own node version is too low. If it is more troublesome to upgrade node in win7, just download win10 directly.
Win7 node upgrade . For details, see: Node upgrade to high version.
Win10 node upgrade . It is recommended to use gnvm. It is easy to use in personal testing. See ( https://blog.csdn.net/ ) for details

Insert image description here

So far. If you match the node version above 14.6, you can use pnpm to install it.
pnpm install installs dependencies
Insert image description here
pnpm serve and
Insert image description here
runs successfully.

Guess you like

Origin blog.csdn.net/weixin_43400431/article/details/125555958