0

I am trying to run my first ionic angular app in a browser to see if I had installed ionic 6 properly on my computer. But I get this error message when using the ionic serve command. I included a reference link to the article that I am following: Running the Ionic app.

ng.cmd run app:serve --host=localhost --port=8100 [ng] Error: Unknown arguments: host, port

[ERROR] ng has unexpectedly closed (exit code 1).

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

I am hoping to see some message that tells me that my test angular app is running with the ionic 6 framework. Sorry, I'm new to this so my question might sound confusing. I would really appreciate the help!

1 Answer 1

0

I don't know if you follow the tutorial that you referenced from the begenning, but in the previous step "set up the development environment", it's mentionned to install ionic with :

npm install -g ionic

But for Ionic starting version 6 and after, this is not the same package. Check in the official documentation "How to install the Ionic CLI".

So you have to run :

npm uninstall -g ionic
npm install -g @ionic/cli

Hope this will solve your problem.

Sign up to request clarification or add additional context in comments.

2 Comments

Thank you very much! I think I got it good for now!
Just accepted! Sorry about that, but I really appreciate your answer. Thank you.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.