Yasas Malinga
Yasas Malinga

Reputation: 29

Can not run ionic project using command ionic server

Using these versions of Ionic, Cordova, and Node.js

Ionic:

ionic (Ionic CLI)  : 4.2.1 <br>(C:\Users\yymal\AppData\Roaming\npm\node_modules\ionic)<br>
Ionic Framework    : ionic-angular 3.9.2<br>
@ionic/app-scripts : 3.2.0<br>

Cordova:

cordova (Cordova CLI) : 8.1.2 ([email protected])<br>
Cordova Platforms     : android 7.0.0<br>
Cordova Plugins       : cordova-plugin-ionic-keyboard 2.1.3, cordova-plugin-ionic-webview 2.2.0, (and 7 other plugins)

System:

NodeJS : v8.12.0 (C:\Program Files\nodejs\node.exe)<br>
npm    : 6.4.1<br>
OS     : Windows 10<br>

When I type ionic serve in the command line, I get the following error:

[app-scripts] '"E:\uQuestfinal\node_modules.bin\ionic-app-scripts"' is not recognized as an internal or external command, [app-scripts] operable program or batch file.

[ERROR] ionic-app-scripts has unexpectedly closed (exit code 1).

The Ionic CLI will exit. Please check any output above for error details.

How can I fix this?

Upvotes: 1

Views: 2716

Answers (2)

Abraham Mathew
Abraham Mathew

Reputation: 2146

please change your ionic version to 3 from 4

Upvotes: 0

Chenru Yan
Chenru Yan

Reputation: 31

[app-scripts] Run npm rebuild node-sass --force to build the binding for your current environment.

Do you get that in the error message? It worked after I ran that command.

Upvotes: 0

Related Questions