![](https://img-blog.csdnimg.cn/img_convert/f294f6667a6d2beb62df865c9334c403.png)
Error: Cannot find module 'node:url' is reported when running the Vue3 code, which means there is a problem with the version of node
You can use nvm to manage the node version
![](https://img-blog.csdnimg.cn/img_convert/2a850c50f4e6b9202bbb1ba39bd3de44.png)
Since the node version of this project on git requires 15+
Use nvm list available to view available node versions
![](https://img-blog.csdnimg.cn/img_convert/86c506e7d2740f46bd3975df3b6475b1.png)
Use nvm install xx.xx.xx to install the node version,
Use nvm use xx.xx.xx to use node version
![](https://img-blog.csdnimg.cn/img_convert/1f995993c0cf67708216572917d7f010.png)
It will be normal when you run the project again
![](https://img-blog.csdnimg.cn/img_convert/6bc7c4a66aa04dad89006908b5ea218a.png)
At this time, the LAN is not open: Network: use --host to expose
There are the following workarounds:
Method 1: Modify the npm script in package.json and add --host 0.0.0.0
![](https://img-blog.csdnimg.cn/img_convert/433d7096109233936f384771382d3db9.png)
Method Two:
Configure server.host in vite.config.js
![](https://img-blog.csdnimg.cn/img_convert/11fa6501d10c3be126b9e7220dcd0747.png)
Method 3: vite cli configuration, execute npx vite --host 0.0.0.0 command