After the npm run serve of the vue project is started, only localhost can be accessed, the network cannot be accessed, and it shows unavailable, as follows: I checked
a lot of solutions on the Internet, and finally found that it is a problem with the environment variable setting:
1. Windows 10 opens the edit system environment variable panel
2. Go to edit and add -C:\windows\System32\Wbem environment variable
3. After configuring the environment variable, restart vscode, and then re-run the project, and found that the network has ip+port Note
: WBEM is a management protocol and network standard technology An industry initiative, this program is very important to the normal operation of the system and cannot be deleted, as deleting it will cause some problems in the system network, among which the above network: unavailable appears.
If there are any mistakes or other questions, please comment and exchange~~
Reference link: https://www.jb51.net/article/262766.htm