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 类型
缺陷
描述清晰度
基本清楚
活跃度
停滞

调研方向

使用 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 摘要。