I have successfully installed Ionic. In fact, I have ran it many times already and it worked perfectly fine (on my browser using "ionic serve" command).. But when I have not done "Ionic stuffs" for a few days, and tried doing it this morning, the command is now unrecognized. What is wrong with this?
相关问题
- Plugin with id 'com.google.gms.google-services
- How to pass form data from Ionic 3 to PHP file?
- apk big size with ionic 4 build
- Ionic Spinner not showing up
- Does specifying the encoding in javac yield the sa
相关文章
- 在vscode如何用code runner打开独立的控制台窗口,以及设置好调试模式时窗口的编码?
- Ionic 4: Hardware Back Button Reloading Applicatio
- Command line escaping single quote for PowerShell
- ionic - Copy/paste in input field in iOS 10 not wo
- net::ERR_CONNECTION_REFUSED ionic
- Typescript Error: Property 'files' does no
- ionic 4 + angular: routerLink only works first tim
- Ionic conditional class css
Variable Name: Path
Variable value: C:\Program Files\nodejs\bin
Try adding this to your user and environment variables , and then close the command prompt window and open. The bin folder needs to be given for both user and environment variables I got my problem resolved :)
I added this the path and all worked well.
You can uninstall as
then clear cache
then re-install as
After a couples days of this exact issue, I found my solution. Remove all of corodva with
npm uninstall cordova
and ionic withnpm uninstall ionic
. Then clear the cache withnpm cache clear
. View this for full removal https://stackoverflow.com/a/29429357/5144902I then found that there was a couple folders still in my C:\Users\USERNAME\AppData\Roaming\npm. I could not remove this, as the file extension was too long. I opened cmd, and removed it with the
DEL
command. I then found that a node_modules folder was under my user folder. I removed that.Then Global install with
npm install -g ionic cordova
. Works perfectly.It had errors that says:
etc, when in fact I'm running as Admin... The trick was to clean the cache before reinstalling Ionic using the command:
It worked for me. Just run
npm
command forcache clean
and reinstall the ionic as:and it works perfectly fine.
None of the solutions worked as permanent fix for me and it was pretty disgusting to use a fix every time I intended to use ionic. So, while browsing for a solution, I read some solutions that eventually led to this: Go to your system settings->Advanced system settings->environment path. In my case, while the 'npm' was indeed added to the system path, it was separated by a single comma inspite of a colon (;). So, I replaced it with a colon and bingo! Please do restart your CMs before trying to test it. Hope it helps!