'ionic'不被视为内部或外部命令 [英] 'ionic' is not recognized as an internal or external command

查看:135
本文介绍了'ionic'不被视为内部或外部命令的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经成功安装了Ionic。事实上,我已经运行了很多次并且它工作得很好(在我的浏览器上使用离子服务命令)..但是当我没有完成离子东西几天,并尝试今天早上这样做,该命令现在无法识别。这有什么问题?

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?

推荐答案

运行Windows 7并自己遇到此问题。我确保以管理员身份运行命令行,按照建议清理缓存,但继续收到离子无法识别的错误...

Running Windows 7 and ran into this issue myself. I ensured that I was running my command line as Administrator, cleaned the cache as suggested but continued to get the error that 'ionic' is not recognized...

尝试后其他一些建议,我终于浏览了我的nodejs位置:C:\Program Files \\\
odejs

After trying several other suggestions, I finally browsed to my nodejs location: C:\Program Files\nodejs

我运行了nodevars.bat来打开nodejs命令提示符,运行离子命令和一切按预期工作。我不确定问题是什么,但从.bat文件运行命令似乎可以修复它。

I ran the nodevars.bat to open the nodejs command prompt, ran the ionic command and everything worked as expected. I'm not sure what the issue is but running command from that .bat file appears to fix it.

这篇关于'ionic'不被视为内部或外部命令的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆