Hacktoberfest 2026:維護者為十月標記出來的 issue,仍然開放、適合新手。 瀏覽 Hacktoberfest issue

ionic serve stuck on "Waiting for connectivity with react-scripts" with Node v18

未關閉
#4,936 9 則留言 7 個 reaction 已指派 0 人 在 GitHub 檢視

還沒有人認領這個 Issue。

評估

難度
4/5
預估耗時
3-5 天
新手友好度
35/100
Issue 類型
缺陷
描述清晰度
基本清楚
活躍度
停滯
技術堆疊
nodejs, react, typescript

研究方向

使用 ionic start my-app blank --type=react 建立新的 Ionic React 專案來重現問題,然後在 Node v18.12.1 下執行 ionic serve,並與 Node v16.18.1 進行比較。從 ionic serve 與 react-scripts 的互動開始調查;當連線等待不再重複,且 live reload 在 Node 18 上正常運作時,即表示完成。

由索引模型根據 Issue 內容生成。

描述

triage

Description:

Node v18.12.1 is the current LTS version. Running ionic serve in an Ionic React project created by the Ionic CLI keeps logging

[INFO] Waiting for connectivity with react-scripts...

and as a result live reload doesn't work.

The exact same project runs fine with Node v16.18.1.

Steps to Reproduce:

Simply create a new Ionic React project and start it

ionic start my-app blank --type=react
cd my-app
ionic serve

Output:

% ionic serve
> react-scripts start
[react-scripts] (node:15924) [DEP_WEBPACK_DEV_SERVER_ON_AFTER_SETUP_MIDDLEWARE] DeprecationWarning: 'onAfterSetupMiddleware' option is deprecated. Please use the 'setupMiddlewares' option.
[react-scripts] (Use `node --trace-deprecation ...` to show where the warning was created)
[react-scripts] (node:15924) [DEP_WEBPACK_DEV_SERVER_ON_BEFORE_SETUP_MIDDLEWARE] DeprecationWarning: 'onBeforeSetupMiddleware' option is deprecated. Please use the 'setupMiddlewares' option.
[react-scripts] Starting the development server...
[react-scripts] 
[react-scripts] You can now view my-app in the browser.
[react-scripts]   Local:            http://localhost:8100
[react-scripts]   On Your Network:  http://192.168.1.120:8100
[react-scripts] Note that the development build is not optimized.
[react-scripts] To create a production build, use npm run build.
[react-scripts] webpack compiled successfully
[react-scripts] Files successfully emitted, waiting for typecheck results...
[react-scripts] Issues checking in progress...
[react-scripts] No issues found.
[INFO] Waiting for connectivity with react-scripts...
[INFO] Waiting for connectivity with react-scripts...
(repeats last message forever)

My ionic info:

Ionic:

   Ionic CLI       : 6.20.4 (/Users/mirko/.nvm/versions/node/v18.12.1/lib/node_modules/@ionic/cli)
   Ionic Framework : @ionic/react 6.4.0

Capacitor:

   Capacitor CLI      : 4.6.1
   @capacitor/android : not installed
   @capacitor/core    : 4.6.1
   @capacitor/ios     : not installed

Utility:

   cordova-res : not installed globally
   native-run  : 1.7.1

System:

   NodeJS : v18.12.1 (/Users/mirko/.nvm/versions/node/v18.12.1/bin/node)
   npm    : 8.19.2
   OS     : macOS

Other Information:

In the Ionic Forum: [INFO] Waiting for connectivity with react-scripts

主要語言
TypeScript
星號
2k
分支
681
PR 合併指標
30 天內沒有已合併 PR

環境準備

從這裡開始

  1. 先讀完整個 Issue,再讀專案的貢獻指南。
  2. 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
  3. Fork 儲存庫,在一個分支上完成修改。
  4. 送出 Pull Request,並在描述裡引用這個 Issue 編號。

ionic-team/ionic-cli 的其他 Issue

查看 ionic-team/ionic-cli 的全部 Issue

相似的 Issue

更多 TypeScript Issue

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。