Error: as shown in the following figure
After many ideological struggles, he began to solve the problem after admitting that it was his own problem:
{
"apiUrl": "http://192.168.56.101:5000/",
"port": "8080",
"host": "127.0.0.1",
"socketHost": "172.16.0.26:443"//Add this line to the json file to configure public (no comments can be written in the json)
}
In reference https://github.com/vuejs/vue-cli/issues/1472
After the discussion, the following solutions are found:
webpack.dev.conf.js file:
Import
const URL = require('../static/config.json');
const socketHost = URL.socketHost;
Add content in devServer: {}:
public: socketHost,
disableHostCheck: true
Fortunately, the problem is solved!
Read More:
- [Solved] Vue Error: /sockjs-node/info?t=
- [Solved] Deploy the front-end package online. Net:: err_SSL_PROTOCOL_ERROR
- How to Solve Files Upload Error: http://net::ERR_SSL_PROTOCOL_ERROR
- [Solved] Vue3 npm ERR code ERR_SSL_DECRYPTION_FAILED_OR_BAD_RECORD_MAC
- [Solved] Vue2 Cross-domain Error: AxiosError net::ERR_FAILED, Network Error, ERR_NETWORK
- [Solved] Failed to load resource: net::ERR_FILE_NOT_FOUND
- “Failed to load resource: net::ERR_FILE_NOT_FOUND” error. The project created by vue-cli 3.0 can run under dev, and an error is reported after packaging, and the page is blank.
- [Solved] Package Install Error: npm ERR code ERR_SOCKET_TIMEOUT npm ERR
- [Solved] Font End Image Display Error: net::ERR_CONNECTION_RESET 431 (Request Header Fields Too Large)
- [Solved] NPM err! Cannot read property ‘parent’ of null npm ERR! A complete log of this run can be found in: npm ERR!
- [Solved] Error: ENOENT: no such file or directory, scandir ‘..\node_modules\node-sass\vendor‘
- npm ERR code ELIFECYCLE [How to Solve]
- [Solved] error C:\Users\HP\Desktop\VueProject\vue_cli\node_modules\node-sass: Command failed.Exit code: 1
- [Solved] npm install Error: error code ERR_SOCKET_TIMEOUT
- After installing NPM, NRM LS reports an error throw new err_INVALID_ARG_TYPE(name, ‘string‘, value)
- [Solved] VS Code Error: Vetur can‘t find ‘tsconfig.json‘ or ‘jsconfig.json‘
- Module not found: Error: Can‘t resolve ‘core-js/modules/es.promise.js‘ in
- [Solved] node.js request Error: Error: unable to verify the first certificate
- [Solved] node.js Upload Files Error: Multipart: boundary not found multer
- [Solved] Node.js v17 npm run dev Error: opensslErrorStack