Hippy icon indicating copy to clipboard operation
Hippy copied to clipboard

启动 webpack.dev.js 后,无法连接 Error: connect ECONNREFUSED 127.0.0.1:38989

Open zhuyuanmin opened this issue 10 months ago • 2 comments

以下是控制台日志:

$ yarn hippy:dev yarn run v1.22.19 $ node ./scripts/env-polyfill.js hippy-dev -c ./scripts/hippy-webpack.dev.js Start to execute cmd: "hippy-dev -c ./scripts/hippy-webpack.dev.js" Current openssl version: 3.0.15+quic Full command execute: "cross-env-os NODE_OPTIONS=--openssl-legacy-provider hippy-dev -c ./scripts/hippy-webpack.dev.js" 2025-03-07 12:22:53.076 entry info version: 0.5.6 2025-03-07 12:22:53.077 entry info start dev argv: {"_":[],"c":"./scripts/hippy-webpack.dev.js","config":"./scripts/hippy-webpack.dev.js","$0":"node_modules\@hippy\debug-server-next\dist\index-dev.js"} (node:34372) [DEP0040] DeprecationWarning: The punycode module is deprecated. Please use a userland alternative instead. (Use node --trace-deprecation ... to show where the warning was created)

  • Using the @hippy/react defined in package.json 2025-03-07 12:22:53.232 webpack-util info webpack publicPath is set as: http://127.0.0.1:38989/ [webpack-dev-server] Project is running at: [webpack-dev-server] Loopback: http://localhost:39000/, http://127.0.0.1:39000/ [webpack-dev-server] Content not from webpack is served from 'D:\workspace\test-demo-project\hippy-native-project\frontend\public' directory adb.exe: error: no devices/emulators found [BABEL] Note: The code generator has deoptimised the styling of D:\workspace\test-demo-project\hippy-native-project\frontend\node_modules@hippy\react-reconciler\cjs\react-reconciler.development.js as it exceeds the max of 500KB. 2025-03-07 12:22:58.230 entry info version: 0.5.6 2025-03-07 12:22:58.231 debug-server info start server argv: {"_":[],"port":38989,"entry":"dist/dev/index.bundle","host":"0.0.0.0","open":true,"enableIOS":true,"enable-i-o-s":true,"log":"info","iWDPPort":9000,"i-w-d-p-port":9000,"iWDPStartPort":9200,"i-w-d-p-start-port":9200,"iWDPEndPort":9300,"i-w-d-p-end-port":9300,"env":"hippy","$0":"node_modules\@hippy\debug-server-next\dist\index-debug.js"} 2025-03-07 12:22:58.306 debug-server info hippy debug steps:
  1. start debug server by run 'npm run hippy:debug'
  2. start dev server by run 'npm run hippy:dev'
  3. open hippy pages with debugMode on mobile/emulator
  4. find connected debug targets on devtools home page: http://localhost:38989/extensions/home.html?env=hippy

find full guide on https://hippyjs.org/#/guide/debug 2025-03-07 12:22:58.313 router info serve bundle: dist/dev/index.bundle; serve folder: D:\workspace\test-demo-project\hippy-native-project\frontend\dist\dev 2025-03-07 12:22:58.396 child-process info tunnel option: {"adb_path":"D:\workspace\test-demo-project\hippy-native-project\frontend\node_modules\@hippy\debug-server-next\dist\build\win\adb.exe","iwdp":{"iwdp_params":["--no-frontend","--config=null:9000,:9200-9300"],"iwdp_listen_port":9000,"iwdp_path":"D:\workspace\test-demo-project\hippy-native-project\frontend\node_modules\@hippy\debug-server-next\dist\build\win\iwdp1.8.8\ios_webkit_debug_proxy.exe"},"only_use_iwdp":0,"iproxy_path":"D:\workspace\test-demo-project\hippy-native-project\frontend\node_modules\@hippy\debug-server-next\dist\build\win\idevice\iproxy.exe","idevice_info_path":"D:\workspace\test-demo-project\hippy-native-project\frontend\node_modules\@hippy\debug-server-next\dist\build\win\idevice\ideviceinfo.exe"} (node:34324) [DEP0040] DeprecationWarning: The punycode module is deprecated. Please use a userland alternative instead. (Use node --trace-deprecation ... to show where the warning was created) (node:34324) [DEP0147] DeprecationWarning: In future versions of Node.js, fs.rmdir(path, { recursive: true }) will be removed. Use fs.rm(path, { recursive: true }) instead Hash: 4f7c7ad30c2c38707a04 Version: webpack 4.47.0 Time: 6521ms Built at: 2025/03/07 12:23:00 Asset Size Chunks Chunk Names asyncComponentFromHttp.index.bundle 2.96 KiB asyncComponentFromHttp [emitted] asyncComponentFromHttp asyncComponentFromLocal.index.bundle 2.97 KiB asyncComponentFromLocal [emitted] asyncComponentFromLocal index.bundle 2.49 MiB index [emitted] index Entrypoint index = index.bundle [0] multi ./node_modules/@hippy/hippy-react-devtools-plugin/lib/backend.js?host=127.0.0.1&port=38989&protocol=http ./node_modules/@hippy/vanilla-js-devtools/dist?domains=%5B%5D&host=127.0.0.1&port=38989&protocol=http ./node_modules/@hippy/hippy-react-refresh-webpack-plugin/client/ReactRefreshEntry.js @hippy/rejection-tracking-polyfill regenerator-runtime ./src/main.js ./node_modules/@hippy/debug-server-next/dist/webpack-dev-server/client?protocol=ws%3A&hostname=127.0.0.1&port=38989&pathname=%2Fdebugger-proxy&role=hmr_client&hash=1b79ccd24d4e45dcbdd3acc4090f9f21&logging=info&hot=true&liveReload=true&progress=false&overlay=false&reconnect=10 ./node_modules/@hippy/debug-server-next/dist/webpack-dev-server/client/hot/dev-server.js 112 bytes {index} [built] [./node_modules/@babel/runtime/helpers/classCallCheck.js] 229 bytes {index} [built] [./node_modules/@babel/runtime/helpers/construct.js] 475 bytes {index} [built] [./node_modules/@babel/runtime/helpers/createClass.js] 583 bytes {index} [built] [./node_modules/@babel/runtime/helpers/getPrototypeOf.js] 412 bytes {index} [built] [./node_modules/@babel/runtime/helpers/inherits.js] 536 bytes {index} [built] [./node_modules/@babel/runtime/helpers/possibleConstructorReturn.js] 493 bytes {index} [built] [./node_modules/@hippy/debug-server-next/dist/webpack-dev-server/client/hot/dev-server.js] 1.74 KiB {index} [built] [./node_modules/@hippy/debug-server-next/dist/webpack-dev-server/client/index.js?protocol=ws%3A&hostname=127.0.0.1&port=38989&pathname=%2Fdebugger-proxy&role=hmr_client&hash=1b79ccd24d4e45dcbdd3acc4090f9f21&logging=info&hot=true&liveReload=true&progress=false&overlay=false&reconnect=10] ./node_modules/@hippy/debug-server-next/dist/webpack-dev-server/client?protocol=ws%3A&hostname=127.0.0.1&port=38989&pathname=%2Fdebugger-proxy&role=hmr_client&hash=1b79ccd24d4e45dcbdd3acc4090f9f21&logging=info&hot=true&liveReload=true&progress=false&overlay=false&reconnect=10 4.65 KiB {index} [built] [./node_modules/@hippy/hippy-react-devtools-plugin/lib/backend.js?host=127.0.0.1&port=38989&protocol=http] 306 KiB {index} [built] [./node_modules/@hippy/hippy-react-refresh-webpack-plugin/client/ReactRefreshEntry.js] 850 bytes {index} [built] [./node_modules/@hippy/rejection-tracking-polyfill/index.js] 3.85 KiB {index} [built] [./node_modules/@hippy/vanilla-js-devtools/dist/index.js?domains=%5B%5D&host=127.0.0.1&port=38989&protocol=http] ./node_modules/@hippy/vanilla-js-devtools/dist?domains=%5B%5D&host=127.0.0.1&port=38989&protocol=http 89.7 KiB {index} [built] [./node_modules/regenerator-runtime/runtime.js] 24.5 KiB {index} [built] [./src/main.js] 1.5 KiB {index} [built] + 231 hidden modules [webpack-dev-server] HMR websocket error: Error: connect ECONNREFUSED 127.0.0.1:38989 at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1615:16) { errno: -4078, code: 'ECONNREFUSED', syscall: 'connect', address: '127.0.0.1', port: 38989 } [webpack-dev-server] Hippy use @hippy/debug-server-next to transit HMR message, connect to debug server failed, recommend to run npm run hippy:debug first! [webpack-dev-server] HMR websocket is closed(1006), will try to reconnect when you modify source code. [webpack-dev-server] enable HMR [webpack-dev-server] enable live reload 2025-03-07 12:23:00.644 webpack-util info bundleUrl: http://127.0.0.1:38989/index.bundle?debugUrl=ws%3A%2F%2F127.0.0.1%3A38989%2Fdebugger-proxy 2025-03-07 12:23:00.644 webpack-util info find debug page on: http://127.0.0.1:38989/extensions/home.html?hash=1b79ccd24d4e45dcbdd3acc4090f9f21 [webpack-dev-server] HMR websocket error: Error: connect ECONNREFUSED 127.0.0.1:38989 at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1615:16) { errno: -4078, code: 'ECONNREFUSED', syscall: 'connect', address: '127.0.0.1', port: 38989 } [webpack-dev-server] Hippy use @hippy/debug-server-next to transit HMR message, connect to debug server failed, recommend to run npm run hippy:debug first! [webpack-dev-server] HMR websocket is closed(1006), will try to reconnect when you modify source code.

zhuyuanmin avatar Mar 07 '25 04:03 zhuyuanmin

另外,ohos har demo 工程运行起来后不管是 hmr 模式 还是 本地 bundle 包模式都是白屏(空白内容),控制台输出和编译都无任何报错。

Image

Image

zhuyuanmin avatar Mar 07 '25 04:03 zhuyuanmin

Pay attention 🛎️ !! There has been no activity on this issue for 2 months, so I will label it stalled. It will be automatically closed in 60 days if no more activity. Feel free to leave a comment if you have any questions.

hippy-service[bot] avatar May 06 '25 19:05 hippy-service[bot]

连不上问题:配置电脑的真实ip,不要用127.0.0.1

etkmao avatar Jul 17 '25 03:07 etkmao

Pay attention 🛎️ !! There has been no activity on this issue for 2 months, so I will label it stalled. It will be automatically closed in 60 days if no more activity. Feel free to leave a comment if you have any questions.

hippy-service[bot] avatar Sep 16 '25 19:09 hippy-service[bot]