在终端“[INFO]等待与npm的连接...”中连续获取此行。 ,当运行 ionic 项目时

问题描述 投票:0回答:1

我正在设置一个具有所有必要依赖项的 Ionic 项目。但是,当我运行命令“ionicserve”时,我在终端中遇到连续显示行“[INFO]等待与npm的连接...”。这使我无法成功运行该项目。

这是我的终端输出的相关部分:

npm.cmd run ionic:serve:before

[email protected] ionic:serve:before
gulp

Using gulpfile E:\NishantDataIonic\Moodle IOS\Moodle\gulpfile.js
Starting 'default'...
Starting 'lang'...
Starting 'env'...
Finished 'env' after 214 ms
Finished 'lang' after 1.04 s
Finished 'default' after 1.04 s
> npm.cmd run ionic:serve -- --host=localhost --port=8100
[npm] > [email protected] ionic:serve
[npm] > gulp watch & NODE_OPTIONS=--max-old-space-size=4096 ng serve --host=localhost --port=8100
[npm] [12:42:57] Using gulpfile E:\NishantDataIonic\Moodle IOS\Moodle\gulpfile.js
[npm] [12:42:57] Starting 'watch'...
[INFO] Waiting for connectivity with npm...

这是我的 Ionic 环境信息:

Ionic:

Ionic CLI : 5.4.16 (C:\Users\user\AppData\Roaming\npm\node_modules\ionic)
Ionic Framework : @ionic/angular 5.0.5
@angular-devkit/build-angular : 15.2.8
@angular-devkit/schematics : 15.2.8
@angular/cli : 15.2.8
@ionic/angular-toolkit : 6.0.0

Cordova:

Cordova CLI : 10.0.0 ([email protected])
Cordova Platforms : not available
Cordova Plugins : not available

Utility:

cordova-res : 0.15.4
native-run : 1.7.2

System:

Android SDK Tools : 26.1.1 (C:\Users\user\AppData\Local\Android\Sdk)
NodeJS : v16.14.2 (C:\Program Files\nodejs\node.exe)
npm : 9.5.0
OS : Windows 10

我已经尝试将 Node 版本从 14 更改为 16,并相应地调整了依赖项。我还在 VS Code 中安装了 Angular 和 Ionic 扩展。 我正在寻求帮助来解决此问题,以便我可以成功运行我的 Ionic 项目。任何指导或解决方案将不胜感激。

node.js angular typescript cordova ionic-framework
1个回答
0
投票

第一步,您可以尝试更新您的 ionic 版本吗?角度 15+ 需要离子 6.3+ https://ionicframework.com/docs/reference/support#ionic-angular

这可以帮助你 https://ionicframework.com/docs/updating/6-0

© www.soinside.com 2019 - 2024. All rights reserved.